Auth0 Home Blog Docs

/userinfo endpoint not returning updated profile


#1

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?


#2

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.


#3

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.