Auth0.Net Management Api: get user by connection not working

I was calling management api GetUsersByEmailAsync, but its returning all users from all connections, but I need the users for a particular connection. I tried to call GetAllAsync by specifying the connection new GetUsersRequest().Connection
When I mention the engine v2, (https://my_auth0_domain/api/v2/users?connection=MyTestDatabaseConnection&search_engine=v2&page=0&per_page=50&include_totals=false)
its also returns all users

As mentioned in the API explorer documentation the connection parameter in that endpoint:

Only applies when using search_engine=v1 . To filter by connection with search_engine=v2|v3 , use q=identities.connection:"connection_name"

You should try to pass a filter (q parameter) based on identities.connection instead of the top-level connection parameter.

1 Like

thank you, it worked

1 Like

Perfect! Glad you have it working @humayun.ahmed!

1 Like

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