# Access-token level custom claims not available

**URL:** <https://community.auth0.com/t/access-token-level-custom-claims-not-available/148332>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [October 1, 2024, 11:48am UTC](https://community.auth0.com/t/access-token-level-custom-claims-not-available/148332 "2024-10-01T11:48:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![avinash.m](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/avinash.m/32/60993_2.png) [@avinash.m](https://community.auth0.com/u/avinash.m)\
**Post date:** [October 1, 2024, 11:48am UTC](https://community.auth0.com/t/access-token-level-custom-claims-not-available/148332/1 "2024-10-01T11:48:04Z")

</div>

I am return the access token with the custom claims using below code in the provided screen shot.  
Using the same code in old accounts it’s working fine. but in new account created a week back with that account i am facing issue.

Issue:  
In Access token my custom claims not available with new account. same code and configuration with old account working fine.

can i know the reason why it’s not returning the claims in access token.

![image](https://global.discourse-cdn.com/auth0/original/3X/8/1/8178872005832ac7033ed92d14edf2ad99e34194.png)

---

<div class="post-metadata">

**Author:** ![petre.timotei](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@petre.timotei](https://community.auth0.com/u/petre.timotei)\
**Post date:** [October 1, 2024, 4:47pm UTC](https://community.auth0.com/t/access-token-level-custom-claims-not-available/148332/3 "2024-10-01T16:47:45Z")

</div>

Hi @avinash.m,

Welcome to the Auth0 Community!

Access tokens with an Auth0 API audience, excluding the `/userinfo` endpoint, cannot have private, non-namespaced custom claims.

- _Auth0 will restrict the creation of private, non-namespaced custom claims on access tokens in which the audience is an Auth0 API._
- Any attempt to set a private, non-namespaced custom claim on an access token where the audience is an Auth0 API will be ignored. The transaction will not fail, but the claim will not be added to your token. Auth0 recommends not setting custom claims on tokens that are to be consumed by Auth0’s APIs.

To add custom claims to Access Token, please refer to these articles:

- [Adding custom claims to tokens](https://community.auth0.com/t/adding-custom-claims-to-tokens/84590)
- [Set Access Token Claims Using Actions](https://community.auth0.com/t/set-access-token-claims-using-actions/88616)
- [Add custom claims to access token without a namespace](https://community.auth0.com/t/add-custom-claims-to-access-token-without-a-namespace/114554)

Also, I would try this code below using the `namespace` format:  
 ![Actions](https://global.discourse-cdn.com/auth0/original/3X/e/2/e26256e648e7cfa8cd601cfd293a9ae4d5c564e5.png)

Therefore, if you are using one of our default audiences, you will have to utilize the namespace claims.

Thanks,  
Timotei

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [October 15, 2024, 4:48pm UTC](https://community.auth0.com/t/access-token-level-custom-claims-not-available/148332/5 "2024-10-15T16:48:32Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
