B2C Custom Policy Setting Metadata Item value dynamically

NigelW61 41 Reputation points
2020-09-09T04:15:08.64+00:00

In a technical profile is it possible to set the metadata item value dynamically from a claim.

   <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.PhoneFactorProtocolProvider.... />
      <Metadata>
        <Item Key="setting.authenticationMode">XXXXXX</Item>
      </Metadata>

In the example above would like to set XXXXXXX to sms or mixed based without having to have two technical profiles.

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.
3,084 questions
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 56,786 Reputation points
    2020-09-10T10:08:50.95+00:00

    Hi @NigelW61 This is not possible. You need to have 2 technical profiles and use a precondition on the orchestration step to indicate which technical profile will get used.

    To minimise XML code, the 2nd technical profile only needs to include the new Id of the technical profile, and the metadata item, and then use the IncludeTechnicalProfile to include the original technical profile.

    You can see an example of this in how we include AAD-Common technical profile in all Azure AD technical profiles.

    https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/blob/master/SocialAndLocalAccountsWithMfa/TrustFrameworkBase.xml#L675

    It would look like this

            <TechnicalProfile Id="modifiedPhoneFactor">  
              <Metadata>  
    <Item Key="setting.authenticationMode">sms</Item>  
              </Metadata>  
              <IncludeTechnicalProfile ReferenceId="PhoneFactor-InputOrVerify" />  
            </TechnicalProfile>  
    

    -----------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful

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.