Email claim not present in output for orchestration step

Cloudy 186 Reputation points
2023-06-04T07:56:04.4233333+00:00

Hi everybody !

I'm facing an issue with the following by using ADB2C and IEF custom policies during the passwordReset userjourney.

I have the following technical profile :


The passwordreset user subjourney is the following:


The aim is to send the email address of the user who wants to RAZ his password.

But when looking at the logs of my endpoint (this is an azure function), the body only contains objectid and userPrincipalName as parameters in body...

I tried different alternatives with signInNames.emailAddress and otherMails in the tech profile, but they are not present....

User's image

So, if anybody can help me, it would be very appreciated because i'm stuck since many days on that part :(

Many thanks at all for your help !

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,656 questions
{count} votes

Accepted answer
  1. Akshay-MSFT 16,036 Reputation points Microsoft Employee
    2023-06-05T08:28:00.4866667+00:00

    @Cloudy

    From the above description I could understand that you want to get "email" claim as output in "password reset" user journey.

    Please do correct me by responding in the comments section.

    To send the email as a claim in the B2C orchestration step output, you can add a ClaimType element to the OutputClaims element of the technical profile that handles the password reset flow. Kindly refer to : https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/blob/main/SocialAndLocalAccounts/TrustFrameworkBase.xml

    PFB example:

    <TechnicalProfile Id="LocalAccountDiscoveryUsingEmailAddress">
      <DisplayName>Reset password using email address</DisplayName>
      <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.ClaimsTransformationProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
      <OutputClaims>
        <OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="email" />
      </OutputClaims>
      <ValidationTechnicalProfiles>
        <ValidationTechnicalProfile ReferenceId="AAD-UserReadUsingEmailAddress" />
      </ValidationTechnicalProfiles>
    </TechnicalProfile>
    

    OR

    <TechnicalProfile Id="LocalAccountDiscoveryUsingEmailAddress">
              <DisplayName>Reset password using email address</DisplayName>
              <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
              <Metadata>
                <Item Key="IpAddressClaimReferenceId">IpAddress</Item>
                <Item Key="ContentDefinitionReferenceId">api.localaccountpasswordreset</Item>
              </Metadata>
              <CryptographicKeys>
                <Key Id="issuer_secret" StorageReferenceId="B2C_1A_TokenSigningKeyContainer" />
              </CryptographicKeys>
              <IncludeInSso>false</IncludeInSso>
              <OutputClaims>
                <OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="Verified.Email" Required="true" />
                <OutputClaim ClaimTypeReferenceId="objectId" />
                <OutputClaim ClaimTypeReferenceId="userPrincipalName" />
                <OutputClaim ClaimTypeReferenceId="authenticationSource" />
    
              </OutputClaims>
              <ValidationTechnicalProfiles>
                <ValidationTechnicalProfile ReferenceId="AAD-UserReadUsingEmailAddress" />
              </ValidationTechnicalProfiles>
            </TechnicalProfile>
    
    
    
    

    Then use the technical profile in the user journey (Order 1)

    <UserJourney Id="PasswordReset">
          <OrchestrationSteps>
            <OrchestrationStep Order="1" Type="ClaimsExchange">
              <ClaimsExchanges>
                <ClaimsExchange Id="PasswordResetUsingEmailAddressExchange" TechnicalProfileReferenceId="LocalAccountDiscoveryUsingEmailAddress" />
              </ClaimsExchanges>
            </OrchestrationStep>
            <OrchestrationStep Order="2" Type="ClaimsExchange">
              <ClaimsExchanges>
                <ClaimsExchange Id="NewCredentials" TechnicalProfileReferenceId="LocalAccountWritePasswordUsingObjectId" />
              </ClaimsExchanges>
            </OrchestrationStep>
            <OrchestrationStep Order="3" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer" />
          </OrchestrationSteps>
          <ClientDefinition ReferenceId="DefaultWeb" />
        </UserJourney>
    
    
    
    

    Please do let me know if you have any queries by responding in the comments section.

    Thanks,

    Akshay Kaushik

    Please "Accept the answer" (Yes), and share your feedback if the suggestion answers you’re your query. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful