Newly created/deleted users are not immediately updated in list of users from API

I am seeing a weird situation with the management API (node). If I try to use the management-client to create a new user and then immediately try and list all available users, the newly created user’s details do not appear. If I try again after a few seconds to fetch all users then the new user does appear in the list.

There seems to be a delay between the user being created and it appearing in the list of all users. However, if I fetch the details of the new user by it’s specific ID, then that is successful – so I know that the user is being created, just not appearing in the list of all users.

I also see similar problems when using the management API to delete a user. The user is successfully deleted, but it takes a while before it stops appearing in the list of users. This is confusing and causes problems with my application (that uses the management API) since it makes it appear as if the operation to create/delete a user was unsuccessful.

I note that there are some reports of similar problems in previous forum posts. But those are from a few years ago, and have been marked as ‘solved’. Is anyone else seeing the same problem?

Hi @fixmaker , welcome to the Auth0 community!

We use the following terms to describe the user search results:

  • Eventually consistent: Search results may not reflect a recently-completed write operation. However, if you repeat your request after a short period of time, the response will return up-to-date data.
  • Immediately consistent: Search results will reflect the results of all successful write operations, including those that occurred shortly prior to your request.

Best practices for user search operations recommend using an immediately consistent endpoints when you need immediately updated data, such as “get users by ID” like you tried.

Eventually consistent endpoints should be used for back office processes such as changing the display name of an existing user.