# GET /api/v2/users :: querying for values in user\_metadata

**URL:** <https://community.auth0.com/t/get-api-v2-users-querying-for-values-in-user-metadata/8666>\
**Category:** Get Help\
**Tags:** api-v2, api, management-api\
**Created:** [November 3, 2017, 7:33pm UTC](https://community.auth0.com/t/get-api-v2-users-querying-for-values-in-user-metadata/8666 "2017-11-03T19:33:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![philip](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/philip/32/3694_2.png) [@philip](https://community.auth0.com/u/philip)\
**Post date:** [November 3, 2017, 7:33pm UTC](https://community.auth0.com/t/get-api-v2-users-querying-for-values-in-user-metadata/8666/1 "2017-11-03T19:33:26Z")

</div>

#### Description

When using the API “GET /api/v2/users” it is not working as expected when using the “q” parameter to specify a Lucene query to select a custom value in “user\_metadata”.

Our user\_metadata looks like:  
`{ tier: number, ... }`

#### Some examples that return an empty list when I would expect some users:

`curl -H "Authorization: Bearer $AUTH0_TOKEN" "https://$AUTH0_DOMAIN.auth0.com/api/v2/users?q=user_metadata.tier:1"`

`curl -H "Authorization: Bearer $AUTH0_TOKEN" "https://$AUTH0_DOMAIN.auth0.com/api/v2/users?q=_exists_:user_metadata.tier"`

#### Open Question

Is there a limited subset of user\_metadata that is available for querying? It’s very unclear why I can reliably query `q=_exists_:user.metadata.name` but not a “custom” value like `tier`

---

<div class="post-metadata">

**Author:** ![philip](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/philip/32/3694_2.png) [@philip](https://community.auth0.com/u/philip)\
**Post date:** [November 3, 2017, 7:56pm UTC](https://community.auth0.com/t/get-api-v2-users-querying-for-values-in-user-metadata/8666/2 "2017-11-03T19:56:54Z")

</div>

Seems that there are limits to what you can search in `user_metadata` after all.

> **[Understand How Metadata Works in User Profiles](https://auth0.com/docs/manage-users/user-accounts/metadata)**
>
> Describes Auth0 user, application, and client metadata. Learn how you can use metadata to store information that does not originate from an identity provider.

Would be nice if the API docs also included the above link.

> **[Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Users/get_users)**

---

<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:** [March 2, 2018, 5:57am UTC](https://community.auth0.com/t/get-api-v2-users-querying-for-values-in-user-metadata/8666/3 "2018-03-02T05:57:17Z")

</div>


