Authorization Extension roles & permissions is not syncing with the user profile

I’m using authorization extension to assign my users with roles, permissions as well as groups.

I’m also assigning the user profile to my id token by adding a custom claims to id token.

api.idToken.setCustomClaim(“user_profile”,event.user.app_metadata);

but when I decode my actual idToken it is showing only the groups that the current user linked with but I’ve assigned roles & permissions to the same user along with the groups.

This is how the user profile looks like

image

How do I sync up the authorization extension with the user profile using my idToken whenever the user getting logged-in?

auth0 auth0-react authorization extension id-token user-metadata app-metadata login JWT.io login authorization management-api

Hi @AbdYashar07,

Welcome to the Auth0 Community!

I have taken a look at your Authorization Extension configuration and it appears that your user hasn’t been assigned any permissions or roles just yet.

To address this, you’ll want to navigate to the Authorization Extension > Users > Your User and click on the Roles tab. From there, you can assign the role or roles to the user.

Once you have completed this step, the next time your user logs in, the Groups, Permissions, and Roles will be included in the user’s app_metadata and set as a custom claim in the ID Token.

If you have any questions or need further assistance, feel free to reach out.

Thanks,
Rueben

1 Like

Hi @rueben.tiow,

I just saw your comments regarding the authorization extension roles & permissions. I’ve checked all the scenarios you’ve said. Still I got the same issue

Later on, I realized that we’ve to login via the application that we’re giving roles to the app when we’re creating the roles once all done well ultimately we’re getting the roles & permissions to the id token that we’re giving.

Anyway thanks for helping.

1 Like

Hi @AbdYashar07,

Thanks for following up.

Ah yes, that is correct. You will need to log in to the respective app that the user was granted the roles and permissions for it to update in the app_metadata and add it to the ID token.

I’m glad everything is working now!

Please let us know if there’s anything else we can do to help.

Thanks,
Rueben

1 Like

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