User Search with multiple user_ids not working

I’m trying to use the Auth0 management API to to query with multiple user_ids, and receive an array of users back. However, it’s not working.

I’m following the docs here: Auth0 Management API v2 and here: User Search v2

This query works as expected, returning an array containing a single user: https://auth-dev.mozilla.auth0.com/api/v2/users?q=user_id:"<user_id_1>"&search_engine=v1

This query doesn’t, returning a ‘Something went wrong’ error: https://auth-dev.mozilla.auth0.com/api/v2/users?q=user_id:("<user_id_1>" OR "<user_id_2>")&search_engine=v1

What am I doing wrong?

I have successfully managed to make a call for multiple user_id’s using search_engine: v2. Please try using v2 to see if it works.

https://auth-dev.mozilla.auth0.com/api/v2/users?q=user_id:("<user_id_1>" OR "<user_id_2>")&search_engine=v2

I now realise the second query in my original post was returning a ‘Something went wrong’ error because I wasn’t url encoding the q parameter. When I do I only get an empty array back.

If I try to use v2:

{“statusCode”:400,“error”:“Bad Request”,“message”:“The ‘q’ parameter is available only if you specify ‘search_engine=v1’.”,“errorCode”:“invalid_query_string”}

@prashant i suspect this is because this tenant is not the public cloud and does not support q= with v2 engine.