Custom Profile Attributes not Included in OpenID idToken

I am working with a custom Angular SPA, and am trying to get at some additional information about our users.

I included the ‘profile’ scope, and am now getting two additional attributes in the idToken:

  • ‘name’
  • ‘preferred_username’

There are many more fields in the profile that are not included in the idToken. I have tried adding a custom attribute, but it is not included in the idToken either.

Why am I only getting ‘name’ and ‘preferred_username’ but not the rest of the information on the user’s profile?

Good question Tim, let me answer it for you:

You need to make a call to the /userInfo endpoint to get the profile information, and to make all your dreams a reality.

Regards
Future Tim

1 Like

Hi @timkeegan

Thank you also for the follow-up. Indeed, in case both access token and ID token and requested, then the ID token is minified and the details are available under /userinfo endpoint.

If you request only the ID token in the response_type along with profile scope, then you will receive and ID token containing all the custom claims.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.