# Need to query app\_metadata in Delegated Admin Extension

**URL:** <https://community.auth0.com/t/need-to-query-app-metadata-in-delegated-admin-extension/10260>\
**Category:** Get Help\
**Created:** [March 21, 2018, 1:17pm UTC](https://community.auth0.com/t/need-to-query-app-metadata-in-delegated-admin-extension/10260 "2018-03-21T13:17:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sefa.ilkimen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sefa.ilkimen/32/4544_2.png) [@sefa.ilkimen](https://community.auth0.com/u/sefa.ilkimen)\
**Post date:** [March 21, 2018, 1:17pm UTC](https://community.auth0.com/t/need-to-query-app-metadata-in-delegated-admin-extension/10260/1 "2018-03-21T13:17:41Z")

</div>

Hi guys,

I need to pass a lucene query containing a tenant ID for filtering the user list. So basically, I’m having the same problem mentioned in these topics:

> [@API stopped querying by metadata](http://community.auth0.com/t/api-stopped-querying-by-metadata/8409):
>
> Hi, Just about 4..5 hrs ago our requests stopped getting responses from API curl -X GET \ 'https://mobile.eu.auth0.com/api/v2/users?q=app\_metadata.person\_uuid%3Dae98e42d-1.........' \ -H 'authorization: Bearer eyJ.........' now we receiving ] earlier { "email": ".....@........com", "email\_verified": true, "updated\_at": "2016-06-03T15:29:47.314Z", "picture": "https://s.gravatar.com/avatar/723d42f66c08........f?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%…

> [@API User metadata search, am I doing something wrong? -- GET /users](http://community.auth0.com/t/api-user-metadata-search-am-i-doing-something-wrong-get-users/8125):
>
> Is this also affected by the new ES clusters? This is what I am using to get all users by “app\_id” : https://{{auth0\_domain}}/api/v2/users?q=user.app\_metadata.app\_id:dd This is the POST to create users: { "connection": "email", "email": "jill@jill.com", "user\_metadata": {"role":"admin"}, "email\_verified": true, "app\_metadata": { "app\_id" :"dd", "license":"dcfff73c75887787531757c8ca986e47", "tracker":"2" } }

> [@How to search for users by using app\_metadata?](http://community.auth0.com/t/how-to-search-for-users-by-using-app-metadata/8688):
>
> Previously, my API could deliver a list of user to the admin of my app by looking for the value of a property “status” stored in the app\_metadata field… Last weeks I found that the API is always returning an empty list, because app\_metadata can’t be queried anymore… I have a very few informations to store for each users and that’s why I’m using Auth0 as a database for dealing with users (which are my API’s main objects). My question is : How am I suppose to do now ? Am I forced to store datas…

and many others …

There is also a corresponding incident mentioned there, but the link seems broken: [Indexing delays on Search API for Free accounts\<!-- --\> • Auth0 Status Page](https://status.auth0.com/incidents/71nlbr16j7ng)

How do I resolve this issue?

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [April 3, 2018, 3:19pm UTC](https://community.auth0.com/t/need-to-query-app-metadata-in-delegated-admin-extension/10260/2 "2018-04-03T15:19:54Z")

</div>

I’m afraid that if you don’t have a tenant that can perform search over custom metadata fields when using search engine v2 then you won’t be able to accomplish that in the extension. As noted in some of the links you posted this ability it’s not available to every tenant.

There’s a new version of the search engine that is being introduced where the query by a tenant ID in metadata would be possible ([Search for Users](https://auth0.com/docs/users/search/v3)), however, this is still not generally available and even if you can already use v3 through the Auth0 Management API, the DAE extension is still making use of v2 ([auth0-delegated-administration-extension/users.js at b5e3527f30a41df481d6af03cf78a01d98679beb · auth0-extensions/auth0-delegated-administration-extension · GitHub](https://github.com/auth0-extensions/auth0-delegated-administration-extension/blob/b5e3527f30a41df481d6af03cf78a01d98679beb/server/routes/users.js#L104)). In conclusion, there does not seem to be a solution for this at this time.

---

<div class="post-metadata">

**Author:** ![sefa.ilkimen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sefa.ilkimen/32/4544_2.png) [@sefa.ilkimen](https://community.auth0.com/u/sefa.ilkimen)\
**Post date:** [April 3, 2018, 3:38pm UTC](https://community.auth0.com/t/need-to-query-app-metadata-in-delegated-admin-extension/10260/3 "2018-04-03T15:38:38Z")

</div>

Hmm ok, that’s actually bad news for me 😕 Do you have a timeline for when DAE will use search engine v3? I mean in the link you’ve posted it says:

> The user search engine v2 will be deprecated soon, so we recommend migrating user search functionality to search engine v3 (search\_engine=v3).

So I’d expect DAE to be migrated to v3 very soon?

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [April 4, 2018, 8:43am UTC](https://community.auth0.com/t/need-to-query-app-metadata-in-delegated-admin-extension/10260/4 "2018-04-04T08:43:41Z")

</div>

As a personal opinion, _soon_ in software development tends to be a bit more of an unknown then the dictionary definition. What I know is that at this precise time the v3 option is still not generally available so forcing DAE to use it (which would be a quick thing) is not feasible at it would be broken for some. In addition, there are some changes between both engines so even when v2 is deprecated there’s still need to be some time for people to move out of it. With all these in mind I’m a bit unsure in terms of timelines for the DAE. I’ll relay this information internally so that at least I know the possibility to use v3 in the extension is already being tracked.

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [April 5, 2018, 10:01am UTC](https://community.auth0.com/t/need-to-query-app-metadata-in-delegated-admin-extension/10260/5 "2018-04-05T10:01:38Z")

</div>

I just wanted to provide you with yet to be confirmed, but possibly some better news related to this. There was work already going for a future release of this extension and the possibility to configure which search engine to use may be included as part of that release so soon in this case may indeed prove to be soon. Have in mind things change, but there’s a good indication that this possibility will land already in the next version (and no, don’t have a timeline for the release of the version).

---

<div class="post-metadata">

**Author:** ![sefa.ilkimen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sefa.ilkimen/32/4544_2.png) [@sefa.ilkimen](https://community.auth0.com/u/sefa.ilkimen)\
**Post date:** [April 5, 2018, 11:46pm UTC](https://community.auth0.com/t/need-to-query-app-metadata-in-delegated-admin-extension/10260/6 "2018-04-05T23:46:45Z")

</div>

Ok, that sounds good! Thank you 🙂

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 25, 2019, 12:40pm UTC](https://community.auth0.com/t/need-to-query-app-metadata-in-delegated-admin-extension/10260/7 "2019-07-25T12:40:41Z")

</div>


