Cannot Find Users With the Get-Users-By-Email Endpoint

Overview

Some users who use an external identity provider to log in have emails with capital letters saved in Auth0. These users are not findable via a search with the GET /api/v2/users-by-email endpoint of the Management API unless case sensitivity is matched. This article explains how to find these users.

Cause

If an external identity provider sends Auth0 an email with capital letters, Auth0 does not modify the profile in any way, so the email will be saved with capital letters. The GET /api/v2/users-by-email endpoint of the Management API is case-sensitive. The case of the email needs to match to find the user.

Solution

To search with the email, use the regular user search endpoint of the Management API, as this endpoint is not case-sensitive.