# How to get all user Claims with tokenOptions

**URL:** <https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [March 15, 2021, 9:32pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486 "2021-03-15T21:32:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![k-auth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/k-auth0/32/18365_2.png) [@k-auth0](https://community.auth0.com/u/k-auth0)\
**Post date:** [March 15, 2021, 9:32pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/1 "2021-03-15T21:32:35Z")

</div>

I see lots of variations and getting confused

> **[Auth0 Angular SDK Quickstarts: Call an API](https://auth0.com/docs/quickstart/spa/angular/02-calling-an-api)**
>
> This tutorial demonstrates how to make API calls to the Auth0 Management API.

> **[Auth0 Angular SDK for Single Page Apps](https://auth0.com/docs/libraries/auth0-angular-spa?_ga=2.195632748.1793481981.1613755560-1127333818.1604614240#configure-the-http-interceptor)**
>
> Describes the Auth0 SDK for Angular Single Page Apps

> **[The Complete Guide to Angular User Authentication with Auth0](https://auth0.com/blog/complete-guide-to-angular-user-authentication/)**
>
> Learn how to add user authentication to Angular using Observables and HTTP Interceptors. Learn the core concepts of Angular authenticatio...

But I want to send token with all his/her claims, to the backend service.  
The below  
{  
uri: ‘/server/api/v1/stas/liam/\*’,  
tokenOptions: {  
audience: ‘[http://localhost:8080](http://localhost:8080)’,  
scope: ‘view:account’,  
},  
},  
[openid, profile, email view:account]

If I dont specify tokenOptions, then scoped in backend is [openid, profile, email] only

But what if the user has 3 more?  
Another user may have only 2 claims. I want my backend to manage - access or deny, not the front end.

Is this possible? Is there an example?

Also wondering how brand new users are granted claims?

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [March 17, 2021, 11:13am UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/3 "2021-03-17T11:13:24Z")

</div>

Hi @k-auth0,

It sounds like the info your API needs should be encoded in the Access Token that Auth0 issues to your application after login.

After authentication takes place, Auth0 will issue an ID Token and an Access Token. The ID Token is used for your frontend to identify the user. The Access Token is sent as a bearer token in the authorization header with each API request. When you [register your API](https://auth0.com/docs/get-started/set-up-apis), you can use the API Identifier as the audience for your application, then you’ll be issued JWT for the Access Token. Your API can validate and decode the JWT to see the claims:

```auto
{
  "iss": "https://yourtenant.us.auth0.com/",
  "sub": "google-oauth2|123456789",
  "aud": [
    "https://test.com",
    "https://yourtenant.us.auth0.com/userinfo"
  ],
  "iat": 1615979031,
  "exp": 1615979051,
  "azp": "Ti6gD0OcKmwbcl4khL82qYrLRqt4Yate",
  "scope": "openid profile email read:messages"
}

```

You can find libraries for validating and decoding JWTs at [jwt.io](https://jwt.io/).

Here is how to register an API:

> **[Register APIs](https://auth0.com/docs/get-started/auth0-overview/set-up-apis)**
>
> Learn how to register APIs in the Auth0 Dashboard.

Please let me know if this is the info you’re looking for! Thank you!

---

<div class="post-metadata">

**Author:** ![k-auth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/k-auth0/32/18365_2.png) [@k-auth0](https://community.auth0.com/u/k-auth0)\
**Post date:** [March 18, 2021, 11:37pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/4 "2021-03-18T23:37:19Z")

</div>

Thanks. The answer is at very high level.  
You suggested to read - register API. I think I did it. I created permissions/scopes etc. That configuration is complete.  
Next step application - the SPA  
the environment.ts, that uses httpInterceptor. In allowedList, I want to specify about backend endpoint

{  
uri: ‘/server/api/v1/stas/liam/\*’,  
tokenOptions: {  
audience: ‘[http://localhost:8080](http://localhost:8080/)’,  
scope: ‘view:account’,  
},  
},

Imagine I want to specify many scopes  
view:account, view:balance view:address

A brand new user user starts application, completed Auth0 login. How will he get the scopes? Do I need to monitor and do grant like an admin? Till that time the progress bar keeps looping?

Scenario2 : I have a user1 with view:account only permission, user2 with view:account, view:balance scopes/permissions

what should I specify in environment.ts?

scope: ‘view:account’,  
or  
scope: ‘view:account’,‘view:balance’ (dont mind if it should be ‘view:account view:balance’)  
But will user1 be allowed to go back to my spring backend or stuck with “consent required” ?

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [March 19, 2021, 2:41pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/5 "2021-03-19T14:41:49Z")

</div>

It sounds like [Enable Role-Based Access Control for APIs](https://auth0.com/docs/authorization/rbac/enable-role-based-access-control-for-apis?_ga=2.98630742.97902719.1615807267-1595415333.1607347674#token-dialect-options) might help you achieve this. Instead of specifying scopes in your `environment.ts,` users can be assigned roles that have permissions associated with the role. The permissions associated with each role can be added to the Access Token.

 ![screenshot-manage.auth0.com-2021.03.19-10_32_12](https://global.discourse-cdn.com/auth0/original/3X/4/3/43be68eada376f03f342966204ab102d839ddd36.png)

Also, here is an FAQ for assigning a default role to users automatically when they log in for the first time: [How do I add a default role to a new user on first login?](https://community.auth0.com/t/how-do-i-add-a-default-role-to-a-new-user-on-first-login/25857)

---

<div class="post-metadata">

**Author:** ![k-auth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/k-auth0/32/18365_2.png) [@k-auth0](https://community.auth0.com/u/k-auth0)\
**Post date:** [March 21, 2021, 2:45pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/6 "2021-03-21T14:45:39Z")

</div>

Thanks for this. RBAC and Add permissions enabled. But I am not getting what I want.

Testing scenario: I have the spring app, that looks for all claims and prints. sub: auth0|5fba\*\*\* , scope: openid profile email  
Test Client: Postman is invoking spring endpoint with authorization. including Scope = openid profile email view:account

But I dont see the permission, I see in auth0 portals users and roles, \>\> users\>\> permissions, in spring app claims. why??

Knowing permissions of user is a very critical feature, and that should be available OOTB?

---

<div class="post-metadata">

**Author:** ![k-auth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/k-auth0/32/18365_2.png) [@k-auth0](https://community.auth0.com/u/k-auth0)\
**Post date:** [March 21, 2021, 5:03pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/7 "2021-03-21T17:03:13Z")

</div>

I have no idea on the **workings** of Enable RBAC, Add Permissions in the Access Token .  
Yikes, even if I disable both - I see scope: openid profile email in jwt  
I am restarting my spring app, angular app, brand new inprivate browser, still, don’t see any difference  
Is this free account special?

I went to auth0 account \>\> users \>\> selected user \>\> permissions \>\> assigned permission \>\> Select permissions from existing APIs\>\> added a List of Permissions (Scopes) of API.  
Still can’t see in claims? So confusing. Does it take time to take effect?

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [March 22, 2021, 3:00pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/8 "2021-03-22T15:00:53Z")

</div>

> [@k-auth0](#):
>
> even if I disable both - I see scope: openid profile email in jwt

Yes, the scope property will be included always. Any setting changes you make should take effect right away.

You may need to set the [token dialect](https://auth0.com/docs/authorization/rbac/enable-role-based-access-control-for-apis#token-dialect-options) so that the user permissions are added as a claim to the Access Token.

To do this, you can go to **APIs \> Auth0 Management API** in your dashboard and select the **API Explorer** tab and copy the test Access Token.

Then go to [Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Resource_Servers/get_resource_servers) and click **TRY** to get the ID of your API.

Finally, update the token dialect by going to [Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Resource_Servers/patch_resource_servers_by_id) and send the ID of the API and the token dialect setting:

```auto
{
  "token_dialect": "access_token_authz"
}

```

 ![screenshot-auth0.com-2021.03.22-10_57_18](https://global.discourse-cdn.com/auth0/original/3X/7/7/77c91d75fa366574e61ca7b324a3e87f39292d63.png)

The decoded Access Token should look like this:

```auto
{
  "iss": "https://your-domain.us.auth0.com/",
  "sub": "google-oauth2|123456789",
  "aud": [
    "https://test.com",
    "https://your-domain.us.auth0.com/userinfo"
  ],
  "iat": 1616425103,
  "exp": 1616511503,
  "azp": "pOW4Xrkst9wHmCJuoBn80DGPHB7IQd2I",
  "scope": "openid profile email",
  "permissions": [
    "read:messages",
    "write:something"
  ]
}

```

The user’s permissions are added to the `permissions` claim ^

---

<div class="post-metadata">

**Author:** ![k-auth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/k-auth0/32/18365_2.png) [@k-auth0](https://community.auth0.com/u/k-auth0)\
**Post date:** [March 22, 2021, 10:49pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/9 "2021-03-22T22:49:58Z")

</div>

> [@stephanie.chamblee](#):
>
> To do this, you can go to **APIs \> Auth0 Management API** in your dashboard and select the **API Explorer** tab and copy the test Access Token.
> 
> Then go to [Auth0 Management API v2](https://auth0.com/docs/api/management/v2?_ga=2.114501440.612154162.1616452206-1127333818.1604614240#!/Resource_Servers/get_resource_servers) and click **TRY** to get the ID of your API.

Thanks for trying to help.

I am sorry, that I’m really struggling with steps

> To do this, you can go to **APIs \> Auth0 Management API** in your dashboard and select the **API Explorer** tab and copy the test Access Token.

Ok I copied

> Then go to [Auth0 Management API v2](https://auth0.com/docs/api/management/v2?_ga=2.114501440.612154162.1616452206-1127333818.1604614240#!/Resource_Servers/get_resource_servers) and click **TRY** to get the ID of your API.

should I click the above link? If yes, then I did, and clicked TRY button - Body is required. Should I assume that I need to paste the token and click TRY?

Also I was not sure where to use copied token, so replaced it for access\_token\_authz

Got error

{  
“statusCode”: 401,  
“error”: “Unauthorized”,  
“message”: “Missing authentication”  
}

Don’t understand why I am doing all this? We are talking about users, not just 1 user

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [March 23, 2021, 11:10am UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/10 "2021-03-23T11:10:49Z")

</div>

You can paste the Management API Explorer Access Token using the button at the top left of the docs.

![screenshot-auth0.com-2021.03.23-07_06_15](https://global.discourse-cdn.com/auth0/original/3X/a/3/a34f071d87f933b53c9c12416436fbae394a87fb.png)

> [@k-auth0](#):
>
> should I click the above link? If yes, then I did, and clicked TRY button - Body is required. Should I assume that I need to paste the token and click TRY?

For the [GET](https://auth0.com/docs/api/management/v2?&_ga=2.98734046.1525467305.1616412661-1595415333.1607347674#!/Resource_Servers/get_resource_servers)[/api/v2/resource-servers](https://auth0.com/docs/api/management/v2?&_ga=2.98734046.1525467305.1616412661-1595415333.1607347674#!/Resource_Servers/get_resource_servers) endpoint, you can leave all of the fields blank to get a list of all of the APIs.

You’ll want to copy the ID of your API so that you can update its settings using the [PATCH](https://auth0.com/docs/api/management/v2?&_ga=2.98734046.1525467305.1616412661-1595415333.1607347674#!/Resource_Servers/patch_resource_servers_by_id)[/api/v2/resource-servers/{id}](https://auth0.com/docs/api/management/v2?&_ga=2.98734046.1525467305.1616412661-1595415333.1607347674#!/Resource_Servers/patch_resource_servers_by_id) endpoint.

After you’ve changed the settings, you should receive every users’ permissions in the Access Token.

---

<div class="post-metadata">

**Author:** ![k-auth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/k-auth0/32/18365_2.png) [@k-auth0](https://community.auth0.com/u/k-auth0)\
**Post date:** [March 23, 2021, 2:49pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/11 "2021-03-23T14:49:09Z")

</div>

Sorry, I have no understanding of all these suggestions. Looks like my question is totally different, and this is very difficult. I am java and angular developer

All I want to do is very simple - create API, SPA configure in my Angular and Spring.  
(1)How to add more scopes/permissions? why user management \>\> user \>\> permissions are not coming to my backend service?  
(2) Do I need to do anything in angular to tell Auth0, that I need scope? Eg - Do I need to use tokenOptions and use scope?

(3) If I have to specify, then I have to add to every endpoint (environment.ts) which is a nightmare  
httpInterceptor: {  
allowedList: [  
{  
uri: ‘/server/api/v1/todo/_/_’,  
tokenOptions: {  
audience: ‘[http://localhost:8080](http://localhost:8080)’,  
scope: ‘view:something’,  
},  
}

P.S. I am deleting all my replies to this post.

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [March 24, 2021, 1:29pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/12 "2021-03-24T13:29:53Z")

</div>

Hi @k-auth0,

> [@k-auth0](#):
>
> (1)How to add more scopes/permissions? why user management \>\> user \>\> permissions are not coming to my backend service?

To get the user permissions added to the Access Token for your backend service, you can update the `token_dialect` setting to `access_token_authz` for your API via the Management API. Documentation: [Sample Use Cases: Rules with Authorization](https://auth0.com/docs/authorization/sample-use-cases-rules-with-authorization#add-user-roles-to-tokens)

> [@k-auth0](#):
>
> (2) Do I need to do anything in angular to tell Auth0, that I need scope? Eg - Do I need to use tokenOptions and use scope?

If there is a scope that every user will need, you can request it in the `tokenOptions`

> [@k-auth0](#):
>
> (3) If I have to specify, then I have to add to every endpoint (environment.ts) which is a nightmare

If you add the scope to the environment, then the scope should always be requested.

I can try to troubleshoot what might be the issue via a HAR file. Could you send me a HAR file in a private message? [Generate and Analyze HAR Files](https://auth0.com/docs/troubleshoot/generate-and-analyze-har-files) Thanks!

---

<div class="post-metadata">

**Author:** ![k-auth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/k-auth0/32/18365_2.png) [@k-auth0](https://community.auth0.com/u/k-auth0)\
**Post date:** [March 24, 2021, 2:40pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/13 "2021-03-24T14:40:55Z")

</div>

> [@stephanie.chamblee](#):
>
> To get the user permissions added to the Access Token for your backend service, you can update the `token_dialect` setting to `access_token_authz` for your API via the Management API. Documentation: [Sample Use Cases: Rules with Authorization](https://auth0.com/docs/authorization/sample-use-cases-rules-with-authorization?_ga=2.186264686.612154162.1616452206-1127333818.1604614240#add-user-roles-to-tokens)

Not sure where I need to put this function, how it get invoked

```
function (user, context, callback) {
  const namespace = 'http://demozero.net';
  const assignedRoles = (context.authorization || {}).roles;

  let idTokenClaims = context.idToken || {};
  let accessTokenClaims = context.accessToken || {};

  idTokenClaims[`${namespace}/roles`] = assignedRoles;
  accessTokenClaims[`${namespace}/roles`] = assignedRoles;

  context.idToken = idTokenClaims;
  context.accessToken = accessTokenClaims;

  callback(null, user, context);
}

```

Is there a “Complete” example that tells how to do inside angular

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [March 24, 2021, 3:14pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/14 "2021-03-24T15:14:48Z")

</div>

The function is actually executed through an [Auth0 Rule](https://auth0.com/docs/rules). Rules are Javascript functions that run after authentication which allow you to customize certain things such as adding custom claims to the Access Token/ID Token.

You can create a rule by going to **Auth Pipeline \> Rules** in your Auth0 dashboard and clicking **+ CREATE RULE**. Select **Empty rule** , and enter in the function and click **Save**.

---

<div class="post-metadata">

**Author:** ![k-auth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/k-auth0/32/18365_2.png) [@k-auth0](https://community.auth0.com/u/k-auth0)\
**Post date:** [March 24, 2021, 4:50pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/15 "2021-03-24T16:50:03Z")

</div>

This is saying roles, but I amusing permissions/scopes isnt?

EDIT: few more things…it uses [http://demozero.net](http://demozero.net) and I have no idea.

Is this rule applicable across all the applications in my account/tenant?

---

<div class="post-metadata">

**Author:** ![k-auth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/k-auth0/32/18365_2.png) [@k-auth0](https://community.auth0.com/u/k-auth0)\
**Post date:** [March 24, 2021, 6:09pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/16 "2021-03-24T18:09:29Z")

</div>

> [@stephanie.chamblee](#):
>
> You can create a rule by going to **Auth Pipeline \> Rules** in your Auth0 dashboard and clicking **+ CREATE RULE**. Select **Empty rule** , and enter in the function and click **Save**.

I created empty rule , and saved the script /function. There is a try button, and it gives John Doe. what is that?

I created Roles, added permissions and users.

But still struggling to get this working

EDIT: I enabled RBAC, allow roles blah blah

Now I get → [http://demozero.net/roles:](http://demozero.net/roles:) null

 ![Capture](https://global.discourse-cdn.com/auth0/original/3X/3/9/3942e0f9e96fad0e62cef1203980fa642cc4506f.jpeg)

Don’t understand how to get rid of that Go to configuration. Doesn’t tell if changes are saved or not

---

<div class="post-metadata">

**Author:** ![k-auth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/k-auth0/32/18365_2.png) [@k-auth0](https://community.auth0.com/u/k-auth0)\
**Post date:** [March 24, 2021, 6:55pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/17 "2021-03-24T18:55:39Z")

</div>

[https://example.com/email:](https://example.com/email:) s\*\*\*.com  
[http://demozero.net/roles:](http://demozero.net/roles:) null  
azp: Zk5\*\*\*\*oS  
permissions: null  
scope: openid profile email

Can anyone help…why roles and permissions are null??

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [March 24, 2021, 7:34pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/18 "2021-03-24T19:34:50Z")

</div>

> [@k-auth0](#):
>
> This is saying roles, but I amusing permissions/scopes isnt?

That’s correct, that rule adds roles to the Access Token and ID Token. If you wanted to add permissions to the Access Token, you’d [enable RBAC for your API](https://auth0.com/docs/authorization/rbac/enable-role-based-access-control-for-apis) and enable “Add Permissions in the Access Token” or enable RBAC via the Management API and set the **Token Dialect** to `access_token_authz` as described above.

> [@k-auth0](#):
>
> EDIT: few more things…it uses [http://demozero.net](http://demozero.net) and I have no idea.

`http://demozero.net1` is an example [custom namespace](https://auth0.com/docs/tokens/create-namespaced-custom-claims). It’s required so that claims don’t collide with and reserved claims.

> [@k-auth0](#):
>
> Is this rule applicable across all the applications in my account/tenant?

Rules execute for every application in your tenant. You can check the application name if you’d prefer to only run a rule for a particular application:

```auto
  if(context.clientName !== 'NameOfTheAppYouWantToRunRuleFor'){
    return callback(null, user, context);
  }

```

> [@k-auth0](#):
>
> I created empty rule , and saved the script /function. There is a try button, and it gives John Doe. what is that?

The John Doe data is just example data that you can try with rules, but you may want to actually log into your application with a user who you have assigned permissions to. You can go to **Getting started** in the dashboard and click **Try it out** under “Try your Login box”.

> [@k-auth0](#):
>
> Can anyone help…why roles and permissions are null??

It looks like you are using the Authorization Extension instead of the Authorization Core (FAQ: [Can I Use Authorization Core and Authorization Extension together?](https://community.auth0.com/t/can-i-use-authorization-core-and-authorization-extension-together/25792)). Unfortunately, you cannot use both, so this may be what is causing the null values for permissions: [Authorization Core vs. Authorization Extension](https://auth0.com/docs/authorization/authorization-core-vs-authorization-extension?_ga=2.104376256.1525467305.1616412661-1595415333.1607347674)

Here are the docs for the Authorization Extension (although the Authorization Core as described in the [earlier posts](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/8) is recommended): [Authorization Extension](https://auth0.com/docs/extensions/authorization-extension)

---

<div class="post-metadata">

**Author:** ![k-auth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/k-auth0/32/18365_2.png) [@k-auth0](https://community.auth0.com/u/k-auth0)\
**Post date:** [March 24, 2021, 7:48pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/19 "2021-03-24T19:48:02Z")

</div>

> [@stephanie.chamblee](#):
>
> It looks like you are using the Authorization Extension instead of the Authorization Core (FAQ: [Can I Use Authorization Core and Authorization Extension together?](https://community.auth0.com/t/can-i-use-authorization-core-and-authorization-extension-together/25792)). Unfortunately, you cannot use both, so this may be what is causing the null values for permissions: [Authorization Core vs. Authorization Extension](https://auth0.com/docs/authorization/authorization-core-vs-authorization-extension?_ga=2.104376256.1525467305.1616412661-1595415333.1607347674)
> 
> Here are the docs for the Authorization Extension (although the Authorization Core as described in the [earlier posts](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/8) is recommended): [Authorization Extension](https://auth0.com/docs/extensions/authorization-extension)

Please if you know, guide me in the right direction.  
_ **Removed Extensions** _

Still getting same response

aud: null  
[https://example.com/email:](https://example.com/email:) sv\*\*\*\*.com  
[http://demozero.net/roles:](http://demozero.net/roles:) null  
azp: Z\*\*\*\*QmdoS  
permissions: null  
scope: openid profile email

---

<div class="post-metadata">

**Author:** ![k-auth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/k-auth0/32/18365_2.png) [@k-auth0](https://community.auth0.com/u/k-auth0)\
**Post date:** [March 24, 2021, 8:23pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/20 "2021-03-24T20:23:45Z")

</div>

> [@stephanie.chamblee](#):
>
> Here are the docs for the Authorization Extension (although the Authorization Core as described in the [earlier posts](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/8) is recommended): [Authorization Extension](https://auth0.com/docs/extensions/authorization-extension)

Where should I use this?

{  
“token\_dialect”: “access\_token\_authz”  
}

I enabled RBAC and Add permission\*\*\* i.e. red underlined as in the article

 ![Capture](https://global.discourse-cdn.com/auth0/original/3X/c/e/cecb5062c8c470d6cfd679c2ece6d31ba81beb09.jpeg)

---

<div class="post-metadata">

**Author:** ![k-auth0](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/k-auth0/32/18365_2.png) [@k-auth0](https://community.auth0.com/u/k-auth0)\
**Post date:** [March 24, 2021, 8:41pm UTC](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486/21 "2021-03-24T20:41:41Z")

</div>

> [@stephanie.chamblee](#):
>
> The John Doe data is just example data that you can try with rules, but you may want to actually log into your application with a user who you have assigned permissions to. You can go to **Getting started** in the dashboard and click **Try it out** under “Try your Login box”.

##### Try your Login box in Get started is giving

“[http://demozero.net/roles](http://demozero.net/roles)”: [  
“super”  
]

Why it is not coming from Angular to Spring?

I am testing my backend using postman, even that is **not** giving the role

[Next page](https://community.auth0.com/t/how-to-get-all-user-claims-with-tokenoptions/59486.md?page=2)
