# Complex api queries

**URL:** <https://community.auth0.com/t/complex-api-queries/118007>\
**Category:** Get Help\
**Tags:** users-by-email, management-api\
**Created:** [October 6, 2023, 6:06pm UTC](https://community.auth0.com/t/complex-api-queries/118007 "2023-10-06T18:06:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FrankDurdin](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@FrankDurdin](https://community.auth0.com/u/FrankDurdin)\
**Post date:** [October 6, 2023, 6:06pm UTC](https://community.auth0.com/t/complex-api-queries/118007/1 "2023-10-06T18:06:55Z")

</div>

I was wondering if anyone could help me understand how complex queries work with Auth0 a little bit better.

I am hoping to pull all the users that belong to an organization with the following query

`${domain}/api/v2/organizations/${org_id}/members`;

But when I do I only get the information, name, email, and picture. Is there a way where I can pull a much more robust amount of information, something more akin to what is closer stored on the user entity?

Or do I have to then query every single user on that list to then provide more details to the front-end.

For context, I am creating a admin panel dashboard

---

<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:** [October 6, 2023, 9:47pm UTC](https://community.auth0.com/t/complex-api-queries/118007/3 "2023-10-06T21:47:18Z")

</div>

Hey @FrankDurdin !

> [@FrankDurdin](#):
>
> But when I do I only get the information, name, email, and picture. Is there a way where I can pull a much more robust amount of information, something more akin to what is closer stored on the user entity?

You can use the [/api/v2/users](https://auth0.com/docs/api/management/v2/users/get-users) endpoint’s [search functionality](https://auth0.com/docs/manage-users/user-search/user-search-query-syntax) to get users associated with a specific `org_id` - This will return a list of users with full profiles. A curl might look like:

```auto
curl -L 'https://{YOUR_TENANT}.us.auth0.com/api/v2/users?q=organization_id%3A%22org_YZN9oXsqpjlPN5R8%22' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {YOUR_MANAGEMENT_API_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:** [October 20, 2023, 9:47pm UTC](https://community.auth0.com/t/complex-api-queries/118007/4 "2023-10-20T21:47:48Z")

</div>

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