Auth0 Home Blog Docs

[React] Get permissions for authenticated user through Auth0Client.getUser()


I currently have an Auth0 SPA React application, which I made following this tutorial:

How do I get the defined user permissions of a user when a user is successfully authenticated?
The Auth0Client.getUser() does not provide this.


Hello @glennydc,

Welcome to the Community!

getUser() reads the data in the ID token. You can add additional user profile attributes to the ID token using a rule. For example, here is a sample rule that adds the attribute app_metadata.uuid (assuming such an attribute exists) to the ID token:

1 Like