Search users with + sign in e-mail addess via mgmt api and getall()

Searching for user+foo@domain.tld via the Management interface (manage.auth0.com) finds the user if it exists.

Searching for it via the Mgmt API / search function users->getall() and q=user+foo@domain.tld, the user is not found.

What is the general advise to find the user in this case?

I found the email andpoints, but that is also not working:

Client error: GET https://site.eu.auth0.com/api/v2/users-by-email?email=fabian+foobar@domain.tld resulted in a 400 Bad Request response:
{“statusCode”:400,“error”:“Bad Request”,“message”:"Query validation error: 'Object didn’t pass validation for format ema (truncated…)

I figured it out: The PHP SDK is just not encoding the query string properly. If I encode the plus sign to %2b, I can find the e-mail.

Will this fixed within the SDK eventually?

1 Like

Glad you figured it out and thanks for sharing with the rest of community!

It will be best if you can relay that directly to PHP SDK repo maintainers directly through a GitHub issue so it can be addressed in the SDK eventually.