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.
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: