Okta ID Token Is Missing Profile Values Despite Requesting Profile Scope
Last Updated:
Overview
When an OpenID Connect (OIDC) authorization request includes the profile scope alongside a grant type that returns both an Access Token and an ID Token, Okta returns a thin ID Token that contains only a limited set of profile claims. This occurs because OIDC specifications require profile claims to be returned from the UserInfo endpoint when the authorization server issues an Access Token.
Retrieve the missing profile values by calling the /userinfo endpoint with the Access Token or by configuring custom claims on a custom authorization server.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Interaction Code flow
- Authorization Code flow
- Implicit flow
- Resource Owner Password flow
Cause
This is expected behavior according to OpenID Connect (OIDC) specifications.
When a request uses a response_type value that issues an Access Token, Okta returns the claims that the profile, email, address, and phone scopes request from the UserInfo endpoint instead of the ID Token. Okta returns these claims in the ID Token only when the authorization server does not issue an Access Token (such as when response_type equals id_token).
- The Interaction Code and Authorization Code flows always return an Access Token and ID Token together.
- The Implicit flow returns both tokens when
response_type=id_token+token. - The Resource Owner Password flow returns both tokens when the token request includes the
openidscope.
Solution
How does the UserInfo endpoint return profile attributes?
Call the /userinfo endpoint using the provided Access Token to return all user claims. Review the documentation on the /userinfo endpoint for a Custom Authorization Server or the Org Authorization Server. Review the Authorization servers documentation to determine which type of authorization server the environment uses.
Configure Custom Claims on a Custom Authorization Server
When using a custom authorization server, configure custom claims to return the required profile attributes directly in the ID Token. This configuration eliminates the need to make a /userinfo call.
