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

Problem statement

Some users who use an external identity provider to login have emails with capital letters saved in Auth0. We are not able to find these users in a search with the GET /api/v2/users-by-email endpoint of the Management API unless we match case sensitivity. Is there a way 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 the capital letters. The GET /api/v2/users-by-email endpoint of the Management API is case sensitive, so you will need to match the case of the email to find the user.

Solution

Alternatively, you can use the regular user search endpoint of the Management API to search with their email as this endpoint is not case sensitive.