# How to retrieve user's id from mobile side?

**URL:** <https://community.auth0.com/t/how-to-retrieve-users-id-from-mobile-side/6412>\
**Category:** Get Help\
**Tags:** username-password-co, userinfo, api, social-connections, auth0\
**Created:** [April 28, 2017, 11:42pm UTC](https://community.auth0.com/t/how-to-retrieve-users-id-from-mobile-side/6412 "2017-04-28T23:42:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandy](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@sandy](https://community.auth0.com/u/sandy)\
**Post date:** [April 28, 2017, 11:42pm UTC](https://community.auth0.com/t/how-to-retrieve-users-id-from-mobile-side/6412/1 "2017-04-28T23:42:34Z")

</div>

On the mobile side, I need to be able to have the user’s ID field so that I can use that information to query on another database. How can I get this data in the mobile code? Is there an Auth0 API to query this data based on the user’s email (using database method and social login method)?

Thanks!

---

<div class="post-metadata">

**Author:** ![Abhishek\_Hingnikar1](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@Abhishek\_Hingnikar1](https://community.auth0.com/u/Abhishek_Hingnikar1)\
**Post date:** [April 29, 2017, 1:47am UTC](https://community.auth0.com/t/how-to-retrieve-users-id-from-mobile-side/6412/2 "2017-04-29T01:47:01Z")

</div>

Have you looked into [Auth0 Rules](https://auth0.com/docs/rules) and [Auth0 Hooks](https://auth0.com/docs/hooks) both of which solve different problems however can be used as the part of singup/signin flow to fetch more information from a 3rd party database (or in your case fetching it from micro service)

---

<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:** [May 30, 2017, 9:58pm UTC](https://community.auth0.com/t/how-to-retrieve-users-id-from-mobile-side/6412/3 "2017-05-30T21:58:23Z")

</div>

In general the authentication response returned to your mobile application will include an ID token that after validation can be used to obtain that information, more specifically, the `sub` claim of the ID token will contain the Auth0 user identifier.

---

<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:** [March 2, 2018, 5:53am UTC](https://community.auth0.com/t/how-to-retrieve-users-id-from-mobile-side/6412/4 "2018-03-02T05:53:35Z")

</div>


