Using the management api to get user information based on Identity Provider Attributes

Hi there

This is my first post and I am pretty new to auth0. So I will do my best to explain what I am trying to do.

I am wondering if this is possible. We have a custom field that I can see in the auth0 management gui for each user under the “Identity Provider Attributes” section. Let’s call it “customField”. I would like to be able to get the user based on this field. So I am trying to use the Management API using this GET request “https://auth-dev.test.tyro.com/api/v2/users?q=customField%3A"%22&search_engine=v3” (I am passing a Management API Token in the header as well). But it is returning an error saying “Invalid query: filter can not be used with unknown field ‘customField’”. I am just trying to figure out if this can be done? If so, how do I go about doing this?

Thanks
Chris

Hey there @cmunro welcome to the community!

Does the customField exist within the “identities” array in Identity Provider Attributes or outside of it? If within, I might expect a query similar to this to work:

curl --request GET \
  --url 'https://YOUR_DOMAIN.auth0.com/api/v2/users?q=identities.profileData.customField%3A%22exampleValue%22&search_engine=v3' \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

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