# Does the call to the /userinfo endpoint return a unique user identifier?

**URL:** <https://community.auth0.com/t/does-the-call-to-the-userinfo-endpoint-return-a-unique-user-identifier/8552>\
**Category:** Get Help\
**Tags:** userinfo\
**Created:** [October 23, 2017, 4:34pm UTC](https://community.auth0.com/t/does-the-call-to-the-userinfo-endpoint-return-a-unique-user-identifier/8552 "2017-10-23T16:34:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![linrain1107](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@linrain1107](https://community.auth0.com/u/linrain1107)\
**Post date:** [October 23, 2017, 4:34pm UTC](https://community.auth0.com/t/does-the-call-to-the-userinfo-endpoint-return-a-unique-user-identifier/8552/1 "2017-10-23T16:34:42Z")

</div>

I followed “Angular 2 Authentication Tutorial” and run it successfully.

Does the “profile” that I get by `this.auth0.client.userInfo(authResult.accessToken)`  
contain a unique id? ex: `{"sub":"google-oauth2|1169996786XXXX7670996"}`.

Can I use `1169996786XXXX7670996` to be my user’s ID on my web application?  
If I can not, where I can find the e-mail address which used by user login.

---

<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:** [October 24, 2017, 10:38pm UTC](https://community.auth0.com/t/does-the-call-to-the-userinfo-endpoint-return-a-unique-user-identifier/8552/2 "2017-10-24T22:38:20Z")

</div>

By default, the user identifiers generated by Auth0 will be unique across the same tenant/domain. There are some situations where you are in control of the user identifiers generated so in those situations you would need to ensure the uniqueness yourself.

Based on the information provided you do not seem to be in a situation where you are controlling the user identifiers being generated so you would not need to worry about that part and it would be okay for you to use the `sub` claim value to uniquely identity the user in association with a single Auth0 tenant/domain.

**Have in mind that you need to use the full value of the `sub`claim as the unique identifier**. In your example, you have to use `google-oauth2|1169996786XXXX7670996` and not just the `1169996786XXXX7670996` part.

---

<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:57am UTC](https://community.auth0.com/t/does-the-call-to-the-userinfo-endpoint-return-a-unique-user-identifier/8552/3 "2018-03-02T05:57:05Z")

</div>


