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

**URL:** <https://community.auth0.com/t/using-the-management-api-to-get-user-information-based-on-identity-provider-attributes/121383>\
**Category:** Get Help\
**Tags:** users, management-api\
**Created:** [November 21, 2023, 11:23pm UTC](https://community.auth0.com/t/using-the-management-api-to-get-user-information-based-on-identity-provider-attributes/121383 "2023-11-21T23:23:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmunro](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@cmunro](https://community.auth0.com/u/cmunro)\
**Post date:** [November 21, 2023, 11:23pm UTC](https://community.auth0.com/t/using-the-management-api-to-get-user-information-based-on-identity-provider-attributes/121383/1 "2023-11-21T23:23:19Z")

</div>

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"](https://auth-dev.test.tyro.com/api/v2/users?q=customField%3A%22)%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

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [November 23, 2023, 12:44am UTC](https://community.auth0.com/t/using-the-management-api-to-get-user-information-based-on-identity-provider-attributes/121383/3 "2023-11-23T00:44:24Z")

</div>

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:

```auto
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'

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 7, 2023, 12:45am UTC](https://community.auth0.com/t/using-the-management-api-to-get-user-information-based-on-identity-provider-attributes/121383/4 "2023-12-07T00:45:20Z")

</div>

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