How to query applications using management api with filters

How to filter application using their metadata while querying using management API Auth0 Management API v2

An example request payload will help.

Hi @jmj ,

Here is the payload to filter by application’s client id.

GET https://{{auth0_domain}}/api/v2/clients

{
    "client_id": "your client id"
}

Hope this helps!

Hi @lihua.zhang - I understand filtering by client_id is available. my question is specific to client_metadata. Can I use them like

{

    "metadata" {
      "metadata_key" : "filter-val"
    }
}

Hi @jmj ,

I tried querying client metadata with your script and it works.

Does it work for you?

1 Like

Thanks - I guess I should have just tried it first :slight_smile: - Thank you.

1 Like

I tried this from auth0 management go SDK

appList, err := management.Client.List(management.IncludeFields("client_id", "client_metadata", "client_secret", "description", "name"), management.Query("{  \"client_metadata\": {    \"key1\": \"val1\",\"key2\": \"val2\"}}"))

it returns me all the applications. Filter is ignored. What is wrong here?

Hi @jmj ,

I did more tests and checked the internal conversation and realized that we can not filter by client metadata using the Management API endpoint. Regardless of what parameters we use to filter clients in the body scripts, it will always return all the applications. Sorry about the miscommunication earlier.

If you are interested in this feature, please communicate with our product team directly via feedback. Thanks!

1 Like