Retrieve JTI from external identity provider

Amrit Gurung 1 Reputation point
2022-12-13T13:00:00.09+00:00

Hi there, i have been trying to retrieve the jti claim returned to us by an external provider (NHS Login) within the custom policy. This jti token is required for SSO on the external identity provider site. The plan is to capture the jti pass is to the calling application and for subsequent SSO we will pass this jti to the b2c policy which will then create a singed JWT and pass it on to the external identity provider.

The link to nhs login documentations

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
3,240 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alfredo Revilla - Upwork Top Talent | IAM SWE SWA 27,521 Reputation points Moderator
    2022-12-15T03:20:41.427+00:00

    Hello @Amrit Gurung and thanks for reaching out. For Azure AD B2C to capture and issue the jti claim from the token issued by the NHS Login provider you need to:

    1. Register the claim type in your ClaimsSchema:
       <ClaimType Id="jti">  
         <DisplayName>jti claim</DisplayName>  
         <DataType>string</DataType>  
         <DefaultPartnerClaimTypes>  
           <Protocol Name="OAuth2" PartnerClaimType="jti" />  
         </DefaultPartnerClaimTypes>  
       </ClaimType>  
    
    2. Add it to your NHS Login Provider/Technical Profile OutputClaims element.
       <OutputClaims>  
         <OutputClaim ClaimTypeReferenceId="jti" />  
       </OutputClaims>  
    
    3. Add it to your User Journey OutputClaims element.
       <OutputClaims>  
         <OutputClaim ClaimTypeReferenceId="jti" />  
       </OutputClaims>  
    

    To pass the jti claim to a new user flow/custom policy you can post it as a query param (E.g. ?jti=token), and send it to your NHS Login Provider authorization endpoint using the former InputClaims and OAuth2 key-value parameters claim resolver (Eg. {OAUTH-KV:jti}).

       <InputClaims>  
         <InputClaim ClaimTypeReferenceId="jti" DefaultValue=" {OAUTH-KV:jti}" />  
       </InputClaims>  
    

    Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.