# Can I get a user using the \`user\_id\` of a linked identity?

**URL:** <https://community.auth0.com/t/can-i-get-a-user-using-the-user-id-of-a-linked-identity/63055>\
**Category:** Get Help\
**Tags:** account-linking, user\
**Created:** [May 19, 2021, 2:59pm UTC](https://community.auth0.com/t/can-i-get-a-user-using-the-user-id-of-a-linked-identity/63055 "2021-05-19T14:59:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vladi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vladi/32/29512_2.png) [@vladi](https://community.auth0.com/u/vladi)\
**Post date:** [May 19, 2021, 2:59pm UTC](https://community.auth0.com/t/can-i-get-a-user-using-the-user-id-of-a-linked-identity/63055/1 "2021-05-19T14:59:06Z")

</div>

Say I have 2 database connections, can I get a user using the secondary connection’s `user_id`?

This link seems to suggest the answer is yes? [Identify Users](https://auth0.com/docs/users/identify-users)

But I keep getting a 404 back - I’ve tried to use the connection name, connection ID as a prefix before the pipe, but no luck.

---

<div class="post-metadata">

**Author:** ![ricardo.batista](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ricardo.batista/32/7711_2.png) [@ricardo.batista](https://community.auth0.com/u/ricardo.batista)\
**Post date:** [May 21, 2021, 7:30am UTC](https://community.auth0.com/t/can-i-get-a-user-using-the-user-id-of-a-linked-identity/63055/2 "2021-05-21T07:30:42Z")

</div>

Hi @vladi

The [GET /api/v2/users/{id}](https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id) endpoint from the management API needs the primary user\_id to be used in the request, so indeed you’ll get a 404 if you try to use the secondary user\_id.

---

<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:** [May 27, 2021, 10:50am UTC](https://community.auth0.com/t/can-i-get-a-user-using-the-user-id-of-a-linked-identity/63055/3 "2021-05-27T10:50:51Z")

</div>

Thanks for helping on this one Ricardo!

---

<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:** [May 27, 2021, 10:50am UTC](https://community.auth0.com/t/can-i-get-a-user-using-the-user-id-of-a-linked-identity/63055/4 "2021-05-27T10:50:53Z")

</div>


