Stale data returned by v2/users API

I have been using GET .eu.auth0.com/api/v2/users to read up to date list of users in my tenant for a coouple of months. It worked like a charm, but recently I have noticed that it started returning stale data:

  1. When new user registers it is immediately included into the list returned by v2/users API and all the data is correct.
  2. If user updates information about himself, e.g verifies e-mail, then GET /v2/users continue to return old data. The values themselves are stale as well as updated_at attribute: all of them match values at user creation.
    3)If I open the same user in Auth0 console, I see correct values and correct timestamps.

Best regards,
-Alexei Mokeev.

Good afternoon,

Thanks for all the information you have provided. We are aware of this issue and investigating this.

Do you have a paid tenant, if so, I would recommend opening a support ticket. If you do not, please dm me your tenant name and the affected users.

Could you also provide information around your general flow?

Thanks!

Hi Karen, I have sent you all the information in DM. Best regards,-Alexei

To everyone: If you are experiencing the same stale data, I have found a way to manually invalidate the cache and force all updates to be picked up. To do this you may update some “fake” property in “app_metadata”, and apparently this forces user list to return correct information.
Assuming that you have list of user ids with problems in file /tmp/users and valid token in TKN variable, the command like below may help:

bash> for u in `cat /tmp/users`;do curl -X PATCH -H “Authorization: Bearer $TKN” -H “Content-Type: application/json” -d ‘{“app_metadata”:{“enforce_refresh”:1}}’ “https://>your_domain.eu.auth0.com/api/v2/users/${u}”;done