User Search Sometimes Does Not Return Newly Created Users

Overview

We are running automated tests that involve creating a user and then trying to find that user by calling this user search endpoint: /api/v2/users?q=<EMAIL>

We have noticed that occasionally, nothing is found even though a user was just created with the email we are searching for.

Applies To

  • User Search
  • New Created Users

Cause

As mentioned in our public docs, the GET /api/v2/users endpoint is eventually consistent. This means that search results may not reflect a recently-completed write operation. However, if the request is repeated after a some period of time, the response will eventually return up-to-date data.

Solution

Based on this use case, (searching using an email address), if you need immediately-consistent results, we would recommend using the Get Users By Email endpoint of the management API (Retrieve Users with Get Users by Email Endpoint ).

Recommended content

No recommended content found...