Getting 500 error on a specific search query

So I’m getting a very specific error when calling the management API. When I make this call (with a valid token)
https://[mydomain].auth0.com/api/v2/users?q=app_metadata.field%3A5e592&search_engine=v3

I get 500 error.

However, this call works fine
https://[mydomain].auth0.com/api/v2/users?q=app_metadata.field%3A5e59a&search_engine=v3

The only difference is
app_metadata.field%3A5e592 ← doesn’t work if digit is a ‘2’
app_metadata.field%3A5e59a ← does work if it’s an ‘a’

I’ve tried various other combinations and if the last char is a number seems to error out, whereas if it’s a letter it’s fine

Also doesn’t matter what the field name actually is. Can replace ‘.field’ with something else and still get the same behavior.

Anyone have any idea what’s going on here?

For some context, the error originally occurred when querying for

app_metadata.field:5e592921747481257102075d,

where the value is a Mongo ObjectId. After some trial and error, figured out that the minimum query value that caused the error was ‘3A5e592’

In case anyone else is having this issue. The issue turned out that the value had to be enclosed in quotes. :unamused:

1 Like

Glad you have eventually figured it out!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.