OIDC Custom Claim not showing in either access token or ID token

Using Auth Code flow.
Authorization server (issuer = https://dev-XXXXX.okta.com)

What has been done

  1. Added custom claim
  2. Validated id token and access token for a user in token preview
  3. Set the mappings for app to Okta User User Profile and vice-versa for both appuser.$customClaim and user.$customClaim.

Unable to get the custom claims for app in the oauth2Token jwt.
iss in the jwt is as expected

Please let me know if I am missing something.


Make sure you are using the right authorization server, the one you created the custom claim for, as the issuer of the token.

It sounds like you are using the Org Authorization Server (where issuer = Okta domain), but you will need to update this so that you use the Custom Authorization Server with this claim to get tokens. If you go back to where you created the claim and then switch to the “Settings” tab in the Admin Console, you’ll see the Issuer URL for the server.