Auth0 Home Blog Docs

Sign in user and include access to API in one fell swoop


I’m new to Auth0 and feel like I’m just not getting a concept here.

I’ve created an API under tenant with a scope of ‘full_access’

I authenticate a user via the Auth0-js library with a scope of “openid profile full_access” but it never includes the azure function url that I’ve referenced in the API in the “aud” array of the access_token.

let webAuth = new auth0.WebAuth({
  domain: domain,
  clientID: clientId,
  // make sure this line is contains the port: 8080
  redirectUri: 'https://localhost:8080/callback',
  // we will use the api/v2/ to access the user information as payload
  audience: 'https://' + domain + '/api/v2/',
  responseType: 'token id_token',
  scope: 'openid profile full_access'

Any help would be appreciated.


:thinking: You did get the concept, that is the concept. So, we’re gonna have to do a little debugging here. What application type did you set in the Dashboard?


It’s a SPA application. I’m writing the app in VueJS and hitting Azure Functions as the REST API.