Unable to get custom user properties (user_id) from Auth0 in Azure AD B2C claims

Gangarde, Sachin 20 Reputation points
2024-03-19T20:08:19.5466667+00:00

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.

enter image description here

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.

Microsoft Identity Manager
Microsoft Identity Manager
A family of Microsoft products that manage a user's digital identity using identity synchronization, certificate management, and user provisioning.
617 questions
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.
2,652 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,563 questions
{count} votes