# How to get Tenant Member by user\_id

**URL:** <https://community.auth0.com/t/how-to-get-tenant-member-by-user-id/130717>\
**Category:** Get Help\
**Tags:** tenant-logs-other, insights-monitoring\
**Created:** [March 28, 2024, 2:04pm UTC](https://community.auth0.com/t/how-to-get-tenant-member-by-user-id/130717 "2024-03-28T14:04:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jan.paologo](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jan.paologo](https://community.auth0.com/u/jan.paologo)\
**Post date:** [March 28, 2024, 2:04pm UTC](https://community.auth0.com/t/how-to-get-tenant-member-by-user-id/130717/1 "2024-03-28T14:04:18Z")

</div>

Hi! We got a `user_id` from the Auth0 (Audit) Logs (query `type:sapi` or Filter `API Operation`). But how do we get which Tenant Member is the `user_id` for? Thanks!

---

<div class="post-metadata">

**Author:** ![yoav](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yoav/32/26050_2.png) [@yoav](https://community.auth0.com/u/yoav)\
**Post date:** [March 28, 2024, 3:46pm UTC](https://community.auth0.com/t/how-to-get-tenant-member-by-user-id/130717/3 "2024-03-28T15:46:02Z")

</div>

hi @jan.paologo  
You should be able to query the user search endpoint or within the dashboard to pull up the tenant member the user\_id is associated to.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 28, 2024, 4:00pm UTC](https://community.auth0.com/t/how-to-get-tenant-member-by-user-id/130717/4 "2024-03-28T16:00:30Z")

</div>

Thanks for helping on this one @yoav! 🙇‍♂️

---

<div class="post-metadata">

**Author:** ![jan.paologo](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jan.paologo](https://community.auth0.com/u/jan.paologo)\
**Post date:** [March 28, 2024, 4:02pm UTC](https://community.auth0.com/t/how-to-get-tenant-member-by-user-id/130717/5 "2024-03-28T16:02:13Z")

</div>

Hello yoav, I tried user search endpoint but it only returns actual users (and not tenant members). Is this the dashboard?

 ![image](https://global.discourse-cdn.com/auth0/original/3X/8/3/83930cb30c5855be90231189e1e093c474e9d534.png)

If you wouldn’t mind sending more details or docs. Thank you!

---

<div class="post-metadata">

**Author:** ![jan.paologo](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jan.paologo](https://community.auth0.com/u/jan.paologo)\
**Post date:** [March 28, 2024, 4:51pm UTC](https://community.auth0.com/t/how-to-get-tenant-member-by-user-id/130717/6 "2024-03-28T16:51:20Z")

</div>

This is what we tried and didn’t work on the user\_id of a tenant member

```auto
token="REDACTED"
user_id="REDACTED"
curl -L "https://1stbet.auth0.com/api/v2/users?q=user_id:$user_id" -H "Accept: application/json" -H "Authorization: Bearer $token"

```

We verified that the command and token are correct by using a user\_id of an actual Auth0 user (not a tenant member).  
We need to get user info of a tenant member

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 28, 2024, 11:48pm UTC](https://community.auth0.com/t/how-to-get-tenant-member-by-user-id/130717/7 "2024-03-28T23:48:40Z")

</div>

Hi @jan.paologo,

Thanks for the reply.

The `user_id` attribute is only meant for actual users on your tenant and not for tenant members.

In fact, there is no way to get a tenant member’s user info using the Management API.

If you need to find this information, you can go to the [Auth0 Dashboard \> Settings \> Tenant Members](https://manage.auth0.com/#/tenant/admins).

I hope this helps!

Let me know if you have any questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![jan.paologo](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jan.paologo](https://community.auth0.com/u/jan.paologo)\
**Post date:** [March 28, 2024, 11:57pm UTC](https://community.auth0.com/t/how-to-get-tenant-member-by-user-id/130717/8 "2024-03-28T23:57:54Z")

</div>

Hello Rueben, The Tenant Members page does not show user\_id though. How can we know which Tenant Member is the user\_id for?

 ![image](https://global.discourse-cdn.com/auth0/original/3X/3/6/36c3e3fe54b4935983a3b13f6a746a144bcf9a21.png)

---

<div class="post-metadata">

**Author:** ![jan.paologo](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jan.paologo](https://community.auth0.com/u/jan.paologo)\
**Post date:** [March 29, 2024, 12:03am UTC](https://community.auth0.com/t/how-to-get-tenant-member-by-user-id/130717/9 "2024-03-29T00:03:12Z")

</div>

This is where we got the user\_id of the Tenant Member

 ![image](https://global.discourse-cdn.com/auth0/original/3X/5/1/511cdbe9cbd5cac5bc0224138116b702af87d0e3.png)

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [April 1, 2024, 5:00pm UTC](https://community.auth0.com/t/how-to-get-tenant-member-by-user-id/130717/10 "2024-04-01T17:00:17Z")

</div>

Hi @jan.paologo,

Thanks for the replies.

In your logs, there should be an `"auth"` object that holds information about the user, such as the `user_id` and `email`.

AFAIK, there doesn’t seem to be any way to query the `user_id` of tenant members. However, you should be able to see the user’s email and determine which tenant member performed those changes.

Thanks,  
Rueben

---

<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:** [April 15, 2024, 5:01pm UTC](https://community.auth0.com/t/how-to-get-tenant-member-by-user-id/130717/11 "2024-04-15T17:01:10Z")

</div>

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