Unable to Retrieve Value of 'scope' claim in JWT

I am unable to retrieve the ‘scope’ claim contained in the JWT when using the ‘AuthService’ class provided in ‘@auth0/auth0-angular’.
Neither the ‘user’ or ‘idTokenClaims’ property in AuthService contain the ‘scope’ claim.
Many other claims are there but not the needed ‘scope’ claim.
The JWT does contain the ‘scope’ claim and the expected values for that claim.
How can I retrieve the value of the ‘scope’ claim in the Auth0 JWT?

This is the documentation available for what I am using: AuthService | @auth0/auth0-angular

Example JWT claims:
{
.xyz Domain Names | Join Generation XYZ”: [
“multi_xyz-dev-poweruser”,“multi_xyz_dev-user”
],
https://xyz.io/tenant":"cust1”,
https://xyz.com/tenant":"cust1”,
https://xyz.io/email":"jdoe@cust1.com”,
https://xyz.io/username":"jdoe”,
https://xyz.io/naiat\”:1709227953,
“exp”:1709314353,
“azp”:“4BTh7q71cHi9Ya0Vs5ZWW6n9BfznzjLv”,
“scope”:“openid profile email ia:user ia:poweruser”
}

Hey there @ogglethorp welcome to the community!

This is by design as the scope claim is only relevant to the backend service/API consuming the access token.

2 Likes

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