/userinfo endpoint not returning updated profile

The /userinfo is not returning the most up-to-date version of the user’s profile.

Steps to reproduce:

  1. User obtains access_token by logging in
  2. Update user_metadata using either the Management API or the Auth0 dashboard
  3. Make GET request to /userinfo using the access_token obtained in step 1
  4. Data returned is not the updated data from step 2

If the user obtains a new access_token the /userinfo endpoint will then return the updated profile information when using both the new access_token and the original access_token.

To support the common use case of allowing users to update their profile we are forced to refresh the users access_token in order to get the updated user data.

Is this the expected behavior of the /userinfo endpoint or am I missing something here?

There is an indexing process involved that creates a delay between when a change is made and when it is visible. No idea if that is what you are experiencing but thought I’d mention it.

Thanks for the reply.

Based on my testing the /userinfo endpoint still has not returned the updated profile several minutes later.

From what I can tell there is something involved in the process of obtaining a new access token that refreshes the data returned by the /userinfo endpoint.

I have the same problem and would hope that /userinfo would return the updated user_metadata immediately.

1 Like

You need to generate a new token to get the updated values. This is mentioned in Remarks for the /userinfo endpoint.

https://manage.maf-dev.auth0.com/docs/api/authentication#get-user-info

1 Like

Thanks a lot @haneesh17 for sharing that with the rest of community! @noliver and @Wasserglas let us know if it worked for you!

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