# No ".sub" in silentAuthentication

**URL:** <https://community.auth0.com/t/no-sub-in-silentauthentication/7351>\
**Category:** Get Help\
**Tags:** v8, sdk, userinfo, silent-auth\
**Created:** [July 1, 2017, 1:15am UTC](https://community.auth0.com/t/no-sub-in-silentauthentication/7351 "2017-07-01T01:15:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fredguth](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/fredguth/32/6573_2.png) [@fredguth](https://community.auth0.com/u/fredguth)\
**Post date:** [July 1, 2017, 1:15am UTC](https://community.auth0.com/t/no-sub-in-silentauthentication/7351/1 "2017-07-01T01:15:22Z")

</div>

I didn’t expect this behaviour:  
When I use passworldess\_login to get a token and then use the accessToken to get user info `auth0.webAuth.client.userInfo`, I get:

```
Object {sub: "sms|574dfae283c90a8a88889fbd", name: "XXX", nickname: "XXX", picture: "XXX", updated_at: "2017-06-30T18:07:12.768Z"}

```

When I use silentAuthentication refreshed accessToken in the same userInfo call, I get:

```
Object {name: "XXX", nickname: "XXX", picture: "XXX", updated_at: "2017-06-30T18:07:12.768Z"}

```

No **sub** information.  
I need sub, how do I fix this?

---

<div class="post-metadata">

**Author:** ![fredguth](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/fredguth/32/6573_2.png) [@fredguth](https://community.auth0.com/u/fredguth)\
**Post date:** [July 1, 2017, 2:04am UTC](https://community.auth0.com/t/no-sub-in-silentauthentication/7351/2 "2017-07-01T02:04:39Z")

</div>

@jmangelo do you have any idea?

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [July 3, 2017, 10:38am UTC](https://community.auth0.com/t/no-sub-in-silentauthentication/7351/3 "2017-07-03T10:38:44Z")

</div>

Can you confirm whether you are requesting the `openid` scope?

---

<div class="post-metadata">

**Author:** ![fredguth](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/fredguth/32/6573_2.png) [@fredguth](https://community.auth0.com/u/fredguth)\
**Post date:** [July 3, 2017, 7:33pm UTC](https://community.auth0.com/t/no-sub-in-silentauthentication/7351/4 "2017-07-03T19:33:22Z")

</div>

Yes, I believe I do:  
renewAuth call:  
webAuth.renewAuth({  
clientID,  
audience: `https://${domain}/userinfo`,  
scope: ‘openid profile offline\_access’,  
prompt: ‘none’,  
redirectUri: window.location.origin + ‘/callback.html’,  
responseType: ‘token id\_token’,  
usePostMessage: true  
}, (err, result) =\> {

---

<div class="post-metadata">

**Author:** ![fredguth](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/fredguth/32/6573_2.png) [@fredguth](https://community.auth0.com/u/fredguth)\
**Post date:** [July 4, 2017, 12:11am UTC](https://community.auth0.com/t/no-sub-in-silentauthentication/7351/5 "2017-07-04T00:11:13Z")

</div>

So sorry. Actually, I thought the openid was there, but I was seeing the code in my branch and not the one that eventually went in production.  
That was it.

---

<div class="post-metadata">

**Author:** ![fredguth](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/fredguth/32/6573_2.png) [@fredguth](https://community.auth0.com/u/fredguth)\
**Post date:** [July 4, 2017, 12:11am UTC](https://community.auth0.com/t/no-sub-in-silentauthentication/7351/6 "2017-07-04T00:11:44Z")

</div>

@prashant solved the problem. It was missing ‘openid’ scope.

---

<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:55am UTC](https://community.auth0.com/t/no-sub-in-silentauthentication/7351/7 "2018-03-02T05:55:06Z")

</div>


