<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content

Add Custom Profile Attributes as Claims in an ID Token or /userinfo in Okta

All Engines
Okta Classic Engine
Okta Identity Engine
API Access Management

Overview

Administrators must retrieve custom profile attributes using an Okta Org Authorization Server. Add a custom user profile attribute, map it to the OpenID Connect (OIDC) application, and call the /userinfo endpoint to retrieve the custom profile attributes without upgrading to a Custom Authorization Server.

Applies To

  • Okta Identity Engine (OIE)
  • Okta Classic Engine
  • Okta Org Authorization Server
  • OpenID Connect (OIDC)
  • Implicit, Authorization Code, or Resource Owner Password Grant Types

Solution

How do administrators add custom profile attributes as claims?

Create a custom user profile attribute, assign a value to the user, create a corresponding attribute in the OIDC application, and map the attributes together.

  1. Create a custom user profile attribute by navigating to Directory Profile Editor > User (default).

User(default)

  1. Click on Add Attribute, enter the details, and Save.
    Add Attribute 
  2. Go to Directory > People > select the user > under the Profile tab > click Edit > add a value.

    custom claim attribute
  3. Create a custom attribute on the OIDC App by navigating to Directory > Profile Editor > Apps > click on the OIDC App > Add Attribute.
     App Custom Attribute 
     
  4. Under Mappings > Okta User to OIDC App, map the attribute from Okta to the OIDC App.

Mappings

    1. Link the attribute (Select from the drop-down).

      Link attribute 

    2. Select the desired option.
      Link attribute 
    3. Save Mappings.

 

Retrieve the Custom Profile Attribute by Calling the /userinfo Endpoint

Call the /userinfo endpoint with the required scopes to find the custom profile attribute.

Custom attribute


   NOTE: Both scopes (openid, profile) are required in the request to see the custom attribute at the /userinfo endpoint.

 

Related References

Loading
Okta Support - Add Custom Profile Attributes as Claims in an ID Token or /userinfo in Okta