Unable to get custom user properties (user_id) from Auth0 in Azure AD B2C claims
Gangarde, Sachin
60
Reputation points
Hi,
We have added Auth0 as IDP in Azure AD B2C using custom policies like below:
<TechnicalProfile Id="Auth0-OID">
<DisplayName>Auth0</DisplayName>
<Protocol Name="OpenIdConnect" />
<Metadata>
<Item Key="METADATA">https://*******-dev.auth0.com/.well-known/openid-configuration</Item>
<Item Key="authorization_endpoint">https://*********-dev.auth0.com/authorize</Item>
<Item Key="response_types">code</Item>
<Item Key="response_mode">form_post</Item>
<Item Key="scope">openid email profile</Item>
<Item Key="HttpBinding">POST</Item>
<Item Key="UsePolicyInRedirecturi">0</Item>
<Item Key="client_id">JRC************2I2PTt</Item>
</Metadata>
<CryptographicKeys>
<Key Id="client_secret" StorageReferenceId="B2C_1A_Auth0DevTest1App" />
</CryptographicKeys>
<InputClaims>
<InputClaim ClaimTypeReferenceId="connection" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="objectId" PartnerClaimType="aud" />
<OutputClaim ClaimTypeReferenceId="user_id" PartnerClaimType="user_id" />
<OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="email" />
<OutputClaim ClaimTypeReferenceId="givenName" PartnerClaimType="given_name" />
<OutputClaim ClaimTypeReferenceId="surname" PartnerClaimType="family_name" />
<OutputClaim ClaimTypeReferenceId="displayName" PartnerClaimType="name" />
<OutputClaim ClaimTypeReferenceId="identityProvider" DefaultValue="Auth0.com" AlwaysUseDefaultValue="true" />
<OutputClaim ClaimTypeReferenceId="authenticationSource" DefaultValue="socialIdpAuthentication" />
<OutputClaim ClaimTypeReferenceId="socialIdpUserId" PartnerClaimType="aud" />
<OutputClaim ClaimTypeReferenceId="accountEnabled" DefaultValue="True" AlwaysUseDefaultValue="true"/>
</OutputClaims>
<OutputClaimsTransformations>
<OutputClaimsTransformation ReferenceId="CreateRandomUPNUserName" />
<OutputClaimsTransformation ReferenceId="CreateUserPrincipalName" />
<OutputClaimsTransformation ReferenceId="CreateAlternativeSecurityId" />
<OutputClaimsTransformation ReferenceId="CreateSubjectClaimFromAlternativeSecurityId" />
</OutputClaimsTransformations>
<UseTechnicalProfileForSessionManagement ReferenceId="SM-SocialLogin" />
</TechnicalProfile>
We are getting all the properties in the claims except user_id
(which is Auth0 specific).
Auth0 user profiles looks like below and we want get "user_id
" from user profile in the claims of Azure AD B2C.
We have added user_id
defined as claimtype
and also added in outputclaims
in the user journey; but, all the time we are getting empty value for user_id
claim.
What else needs to be done in order to get an IDP specific values in the claims?
Thank you.
Sign in to answer