<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
0D54z00008BvdkVCAROkta Classic EngineIntegrationsAnswered2024-03-25T06:20:25.000Z2022-10-06T21:19:12.000Z2022-10-07T18:12:35.000Z

t04wl (t04wl) asked a question.

Unable to add 'idp' claim to access token for user

I see the `idp` claim for a user is included on the `id_token` by default. However I am unable to figure out how to add the `idp` claim to a user `access_token`. I have tried several custom claims (`idp`, `idp.id`, `user.idp.id`, `idpuser.idp.id`, etc.) but none of them work. Does anyone know what expression I can use to match a user's IDP id?

 

Image is not available


  • User16594883467582706479 (Customer Support Online Experience)

    Hi, @t04wl (t04wl)​ 

     

    Thank you for posting on our Community page!

     

    I did some research and, as far as I could find, there is no attribute within the user's profile that will contain their IdP. IdP within the ID token is a system claim:

    https://developer.okta.com/docs/reference/api/oidc/#base-claims-always-present

     

    You could try to use a Token Inline hook to modify the access token to contain the same IdP from the user's ID token, but there will be limitations with that method.

     

    e.g. if the user is getting new tokens from the refresh token (which is not intrinsically tied to the Okta User session, and therefore not tied to the IdP session), the ID token/token hook payload may not contain that information.

     

    My advice would be to leverage the Okta Developer forums for this type of questions and take advantage of their expertise.

    https://devforum.okta.com/

     

    Hope this helps!

     

    Thank you for reaching out to our Community and have a great day!

     

    _____________________________________________________________________________

    If my answer helped, remember to select it as best to increase its visibility for other members of the Okta Community who might have the same questions as you. 

    _____________________________________________________________________________

    The Okta Community Catalysts Program is now live. Collect online badges when you participate in the Okta Help Center Questions community. Learn more here.

    _____________________________________________________________________________

     

    Expand Post
  • t04wl (t04wl)

    Thanks @Laura, I will check on the developer forum. I would like to avoid using a `Token inline hook` if possible, because then I have to create a whole new service to store this information that is already in Okta

This question is closed.
Loading
Unable to add 'idp' claim to access token for user