I am using Azure ad b2c custom policy for sign up and sign up using username and want to extract email?

Mepani Arvindkumar Vishram 1 Reputation point
2020-10-21T15:15:17.607+00:00

I am using Azure ad b2c custom policy for sign up and sign up using username and want to extract email or get an email which is used while sign up process?

After user successfully logged in using username and password I am not able to get an email. See below technical profile?

 <TechnicalProfile Id="AAD-UserReadUsingObjectId">
          <OutputClaims>
            <OutputClaim ClaimTypeReferenceId="extension_employeeId" />
            <!-- 
              Get user email who logged in using username
              Reference  link: https://github.com/Azure-Samples/active-directory-b2c-advanced-policies/issues/24
               -->
            <!-- <OutputClaim ClaimTypeReferenceId="email" /> -->
            <OutputClaim ClaimTypeReferenceId="strongAuthenticationEmailAddress" />
            <OutputClaim ClaimTypeReferenceId="extension_mfaByPhoneOrEmail" />
            <!-- <OutputClaim ClaimTypeReferenceId="executed-SelfAsserted-Input" /> -->

             <!-- Required claims -->
            <OutputClaim ClaimTypeReferenceId="strongAuthenticationPhoneNumber" />

            <!-- Optional claims -->
            <!-- <OutputClaim ClaimTypeReferenceId="signInNames.emailAddress" /> -->
            <OutputClaim ClaimTypeReferenceId="signInNames.emailAddress" PartnerClaimType="email" />
            <OutputClaim ClaimTypeReferenceId="displayName" />
            <OutputClaim ClaimTypeReferenceId="otherMails" />
            <OutputClaim ClaimTypeReferenceId="givenName" />
            <OutputClaim ClaimTypeReferenceId="surname" />
                  <OutputClaim ClaimTypeReferenceId="otherMails" PartnerClaimType="emails" />

          </OutputClaims>
          <!-- <OutputClaimsTransformations>
            <OutputClaimsTransformation ReferenceId="CopyEmailToReadOnly" />
          </OutputClaimsTransformations> -->
        </TechnicalProfile>
        <TechnicalProfile Id="AAD-Common">
          <Metadata>
            <Item Key="ClientId">{Settings:ExtensionClientId}</Item>
            <Item Key="ApplicationObjectId">{Settings:ExtensionObjectId}</Item>
          </Metadata>
        </TechnicalProfile>
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,848 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 24,386 Reputation points Microsoft Employee
    2020-10-21T20:40:31.933+00:00

    Hi, this thread should solve your issue! Hope this helps.

    Best,
    James

    0 comments No comments

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.