# Why do I only get a subset of id\_token where I should get more info?

**URL:** <https://community.auth0.com/t/why-do-i-only-get-a-subset-of-id-token-where-i-should-get-more-info/8819>\
**Category:** Get Help\
**Tags:** golang, id\_token\
**Created:** [November 24, 2017, 5:36am UTC](https://community.auth0.com/t/why-do-i-only-get-a-subset-of-id-token-where-i-should-get-more-info/8819 "2017-11-24T05:36:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![malekpatryk\_auth0](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@malekpatryk\_auth0](https://community.auth0.com/u/malekpatryk_auth0)\
**Post date:** [November 24, 2017, 5:36am UTC](https://community.auth0.com/t/why-do-i-only-get-a-subset-of-id-token-where-i-should-get-more-info/8819/1 "2017-11-24T05:36:14Z")

</div>

I have followed Go quick start guide from here [Add Login to Your Go Application - Auth0 Docs](https://auth0.com/docs/quickstart/webapp/golang)

and I am trying to get as much info about user as possible from `id_token` but somehow I am only getting a subset, namely:

decoded profile JSON from https:// + domain + /userinfo return only identity providers ID together with location (which I have programmed in Rules)  
So something like:

```
mapsub:github|73XXXX https://example.com/country:$COUNTRY https://example.com/timezone:$TIMEZONE

```

while id\_token (after decoding) gives only this:

```
exp - 1511508312.000000
https://example.com/country - $COUNTRY
https://example.com/timezone - $TIMEZONE
iss - https://DOMAIN.eu.auth0.com/
sub - github|73XXXX
aud - ZXXXXXXXXXXXXXXXXXXXXXXXXXX
iat - 1511472312.000000

```

yet I am authenticating with the following URL:

```
 https://DOMAIN.eu.auth0.com/authorize?audience=https%3A%2F%2FAPI_DOMAIN&client_id=ZXXXXXXXXXXXXXXXXXXXXXXXXXX&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&scope=openid+profile+email&state=4%2Fs6vCKUD%2BgCBqEO5Db4j2eXjHAOCfkTIOj%2BAcG7w3Y%3D

```

---

<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:** [November 24, 2017, 5:27pm UTC](https://community.auth0.com/t/why-do-i-only-get-a-subset-of-id-token-where-i-should-get-more-info/8819/2 "2017-11-24T17:27:58Z")

</div>

There are a few possible explanation for something like that, in particular:

1. the end-user in question does not have the associated properties in its user profile.
2. you have a rule that is overriding the granted scopes and removes the `email` and `profile` scopes from the set of scopes granted as part of the authentication/authorization transaction.
3. you customized the hosted login page in such way that the scopes sent in the initial request are being lost when continuing the authentication process. For example, not configuring Lock correctly in terms of consuming the `config.internalOptions` that are injected to the hosted login page.

Given you showed that you were trying with a GitHub end-user then that pretty much rules out option one as IIRC GitHub will return email information and other OIDC profile properties.

You can also quickly rule out option two by either ensuring no rule sets `context.accessToken.scope` or simply doing a quick test with all rules disabled.

Since the information you’re obtaining is consistent with the authentication request being completed as if only the `openid` scope had been requested and it’s unlikely that you set a rule that forces only the `openid` scope and would not remember of it I would say that option three would be the most likely.

---

<div class="post-metadata">

**Author:** ![malekpatryk\_auth0](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@malekpatryk\_auth0](https://community.auth0.com/u/malekpatryk_auth0)\
**Post date:** [November 27, 2017, 3:32am UTC](https://community.auth0.com/t/why-do-i-only-get-a-subset-of-id-token-where-i-should-get-more-info/8819/3 "2017-11-27T03:32:36Z")

</div>

Not setting `config.internalOptions` correctly was my case. Thanks again for brillitant support!

---

<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/why-do-i-only-get-a-subset-of-id-token-where-i-should-get-more-info/8819/4 "2018-03-02T05:57:32Z")

</div>


