Hello @Christophe Beke , claim resolvers can only be used within technical profiles but not in claim types. I'm reaching the B2C team to get clarification as why it seemed to work before and come back to you ASAP.
Azure AD B2C Custom Claim OAUTH KV Stopped Working
We want to use custom claims in our Azure AD B2C Identity Experience Framework - Custom Policies.
We've added the ClaimType in our ClaimSchema as the following:
<ClaimType Id="companyId">
<DisplayName>{OAUTH-KV:companyId}</DisplayName>
<DataType>string</DataType>
<UserInputType>Readonly</UserInputType>
</ClaimType>
Next we added the following information in our Technical Profile of our SignInSignUp flow:
<RelyingParty>
<DefaultUserJourney ReferenceId="CustomSignUpOrSignIn" />
<UserJourneyBehaviors>
<SingleSignOn Scope="Tenant" EnforceIdTokenHintOnLogout="true" />
<SessionExpiryType>Rolling</SessionExpiryType>
<SessionExpiryInSeconds>86400</SessionExpiryInSeconds>
</UserJourneyBehaviors>
<TechnicalProfile Id="PolicyProfile">
<DisplayName>PolicyProfile</DisplayName>
<Protocol Name="OpenIdConnect" />
<Metadata>
<Item Key="IncludeClaimResolvingInClaimsHandling">true</Item>
</Metadata>
<InputClaims>
<InputClaim ClaimTypeReferenceId="companyId" AlwaysUseDefaultValue="true" DefaultValue="{OAUTH-KV:companyId}" />
</InputClaims>
<OutputClaims>
...
<OutputClaim ClaimTypeReferenceId="companyId" />
</OutputClaims>
<SubjectNamingInfo ClaimType="sub" />
</TechnicalProfile>
</RelyingParty>
This worked fine before the weekend and gave us the custom claim as a result if we added the custom claim in our B2C endpoint like this:
https://<b2cTenant>.b2clogin.com/<b2cTenant>.onmicrosoft.com/oauth2/v2.0/authorize?p=B2C_1A_SIGNUP_SIGNIN&client_id=<clientId>8&nonce=defaultNonce&redirect_uri=https%3A%2F%2Fjwt.ms&scope=openid&response_type=id_token&prompt=login&companyId=test
After the weekend this suddenly did not work anymore. Anyone has an idea why this does not work anymore or what we did wrong?
Kind regards
Microsoft Security | Active Directory Federation Services
Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Graph
1 answer
Sort by: Most helpful
-
Alfredo Revilla - Upwork Top Talent | IAM SWE SWA 27,541 Reputation points Moderator2023-06-27T07:30:08.9966667+00:00