Not seeing app_metadata in user object

Hi @johan.lindell

In order to retrieve the custom claims that you have set for your user, you will need to use the getIdTokenClaims() when you are populating the user’s profile after authentication.

const claims = await getIdTokenClaims();

This function is available whenever you are using the useAuth0 hook for the React SDK.

You can review the following community post in regards to accessing User Metadata in React.
You can also read more about the functions available in the React SDK in our documentation.
Basically, once you have set the app metadata using an action, it should be available in the user object:

const { user } = useAuth0();

Alternatively, you should be able to access it via the loginWithRedirect() function as explained in this community post.

If you have any extra questions on the matter or if the resources provided above were not useful in resolving the issue, feel free to leave another reply on the post.

Kind Regards,
Nik