AD B2C: E-mail claim for local and federated identities

metalheart 361 Reputation points
2023-03-10T14:30:39.8766667+00:00

I see there is a difference how e-mail is provided for local B2C identities (signInNames.emailAddress email) and for external identities such as Google (email claim).

So far I have only been able to provide them as separate claims in the custom policy (Technical Profile of the Sign Up/Sign In user journey):

<OutputClaim ClaimTypeReferenceId="email" />
<OutputClaim ClaimTypeReferenceId="signInNames.emailAddress" PartnerClaimType="emailLocal" />

What's the best way to approach this?

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,775 questions
0 comments No comments
{count} votes

Accepted answer
  1. James Hamil 23,216 Reputation points Microsoft Employee
    2023-03-10T21:56:46.0933333+00:00

    Hi @metalheart , The best way to approach this would be to map the email claim from the external identity provider to the signInNames.emailAddress claim in your custom policy. This way, you can ensure that the email address is consistent across all identity providers. You can do this by using the OutputClaimsTransformation element in your custom policy.

    Here's an example of how you can map the email claim from the external identity provider to the signInNames.emailAddress claim in your custom policy:

    <OutputClaims>
      <OutputClaim ClaimTypeReferenceId="signInNames.emailAddress" PartnerClaimType="email" />
    </OutputClaims>
    

    This will map the email claim from the external identity provider to the signInNames.emailAddress claim in your custom policy.

    Please let me know if you have any questions and I can help you further.

    If this answer helped you please mark it as "Verified" so other users can verify it.

    Thank you,

    James


0 additional answers

Sort by: Most helpful