Simple API Test Access using Auth0 Sample code, Auth0 Authentication API Debugger, and Postman

I am using ASP.NET Web API (OWIN) Authorization as my API test harness. I have created a default Auth0 API.

alt text

I added to the Web API the proper web.config settings for the Auth0 API

  <appSettings>
    <add key="Auth0Domain" value="mikemichaelis.auth0.com" />
    <add key="Auth0ApiIdentifier" value="test-api.azurewebsites.com" />
  </appSettings>

The API test client was created automatically. I added to the test client configuration the callback necessary to use the Auth0 Authentication API Debugger Extension.

alt text

Using the API Debugger Extension I have selected the proper test client and initiated the OAUTH2 CLIENT CREDENTIALS flow to obtain an access_token
alt text

Within Postman I have tested calling the unsecured Ping API endpoint successfully. Calling the secured endpoint fails as expected. I have added the access_token as an Authorization Bearer token, but the secured Ping call still fails.

alt text

Thank you for any help in fixing my problem!

Thanks,
Mike

There are several things worth checking:

  • You have configured a Non Interactive Client at the Dashboard, for your application.
  • You have authorized the Non Interactive Client to access your API.
  • The audience parameter is passed to the /oauth/token endpoint when obtaining the access_token.

I’d suggest looking through the following Troubleshooting document: