How to troubleshoot access denied due to service not found error?

When reporting issues happening by following existing quickstarts then please provide a direct URL to it; it can be somewhat inferred from the information, but an URL removes any doubt. Also including the exact options you are using will make the troubleshooting process easier which also may lead to faster response time, so there’s an upside for you also


Assuming you refer to the quickstart currently available at (https://auth0.com/docs/quickstart/spa/vanillajs/03-calling-an-api) and your’re using a code similar to the following:

var webAuth = new auth0.WebAuth({
    // base options
    domain: '[account].auth0.com',
    clientID: '[client_id]',
    redirectUri: window.location.href,
    responseType: 'token id_token',
    // calling an api specific options
    audience: '{TestApp}',
    scope: 'openid read:examples'
  });

Then the error in question is triggered because you’re specifying an audience that is not configured. The value of the audience parameter needs to match an existing API service identifier configured in the APIs section of your Dashboard.

If my guesses failed then please update the question with the necessary information.

5 Likes