Share via

Issue propagating MFA context (AMR/ACR) in Azure AD B2C custom policies with multiple federated IdPs - Salesforce

Patnala, Ramesh (Consultant) 0 Reputation points
2026-04-28T19:38:48.4133333+00:00

We are implementing Azure AD B2C custom policies with two federated custom Identity Providers. After authentication, we need to ensure MFA context is correctly represented in the token issued by B2C and consumed by Salesforce.

We want to ensure that after authentication:

  • MFA completion is consistently represented in the issued token
  • Salesforce receives a reliable MFA indicator (AMR/ACR or equivalent)
  • No additional MFA prompt is triggered downstream

What is the recommended pattern for handling AMR/ACR in B2C custom policies when multiple IdPs are involved? Is AMR preserved automatically or must it be explicitly set via claims transformation or OutputClaims?

Microsoft Security | Microsoft Entra | Microsoft Entra External ID

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-04-28T19:39:07.14+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    In Azure AD B2C custom policies, MFA context (AMR/ACR) is not automatically normalized or propagated across multiple IdPs in a way that downstream apps like Salesforce can reliably consume. The recommended pattern is to explicitly control and emit the MFA indicator in the B2C-issued token, independent of how each upstream IdP represents MFA.

    Key points based on the provided material:

    1. B2C MFA is its own step and protocol handler
      When MFA is performed by Azure AD B2C itself (SMS/TOTP), it is implemented via a dedicated technical profile using the proprietary Azure MFA protocol handler:
         <TechnicalProfile Id="AzureMfa-SendSms">
             <DisplayName>Send Sms</DisplayName>
             <Protocol Name="Proprietary" 
                       Handler="Web.TPEngine.Providers.AzureMfaProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
             ...
         </TechnicalProfile>
      
      This means that when B2C performs MFA, the fact that MFA occurred is known inside the user journey and can be surfaced as claims in later steps and in the final token.
    2. External MFA providers and AMR/ACR expectations
      For external providers (including external MFA providers or federated IdPs), Microsoft Entra ID expects:
      • The provider posts back an id_token to the redirect_uri.
      • The id_token contains standard claims including acr and amr:
      Claim Description
      acr Authentication context class reference – must match one of the requested values and only one acr claim should be returned.
      amr Authentication methods reference – array with the method used.
      Microsoft Entra ID validates these claims against the OIDC metadata and the requested acr values. This is the pattern for integrating an external MFA provider and having Entra/B2C understand which authentication method was used. Reference: "Use Microsoft Entra MFA with an external MFA provider" shows the required id_token and acr/amr behavior.
    3. Multiple IdPs: do not rely on automatic AMR/ACR preservation
      With multiple federated IdPs, each IdP may:
      • Use different acr values.
      • Use different amr semantics or omit them.
      B2C does not automatically normalize these into a single, consistent MFA indicator for downstream apps. Instead, the recommended pattern is:
      • Treat the upstream IdP’s acr/amr as input claims in the relevant technical profile.
      • Use claims transformations and/or orchestration logic to map those into a single, B2C-controlled claim (for example, mfa_done = true or a normalized acr value) that is then emitted in the relying party (RP) policy.
      This way, Salesforce only needs to look at the B2C-issued claim, not at each IdP’s native amr/acr format.
    4. Recommended pattern for B2C → Salesforce MFA signaling For a reliable MFA indicator and to avoid extra prompts in Salesforce:
      1. Perform or validate MFA in B2C
        • Either use B2C’s own MFA technical profiles (SMS/TOTP) as part of the user journey, or
        • Integrate an external MFA provider that returns acr/amr in its id_token as described in the Entra external MFA documentation.
      2. Normalize MFA into a dedicated claim
        • In the custom policy’s orchestration steps, after the MFA step (B2C or external), use a claims transformation to set a normalized claim, for example:
          • authentication_methods_reference (string/array) with a value like mfa, or
          • mfa_completed = true, or
          • a normalized acr value such as urn:microsoft:entra:mfa.
      3. Emit the normalized claim in the RP policy
        • In the relying party file (for the Salesforce SAML/OIDC integration), include this normalized claim in OutputClaims so it appears in the token sent to Salesforce.
        • Configure Salesforce to treat that claim as the MFA indicator and to suppress additional MFA prompts when it is present and has the expected value.
      4. Do not depend on raw upstream AMR/ACR
        • Because different IdPs may send different amr/acr values, always map them to the B2C-controlled claim before sending to Salesforce.
    5. Is AMR preserved automatically or must it be explicitly set?
      • For external MFA providers integrated via OIDC, Entra/B2C validates acr/amr from the provider’s id_token, but does not guarantee that these raw values will be emitted unchanged to downstream apps.
      • For B2C-native MFA (AzureMfaProtocolProvider), MFA is known to the policy engine but again must be explicitly surfaced as an output claim.
      • Therefore, for a multi-IdP scenario and for Salesforce integration, the MFA context must be explicitly set and emitted via claims transformations and OutputClaims. Do not rely on automatic AMR/ACR preservation.

    Summary:

    • Use B2C’s MFA technical profiles or an external MFA provider that returns acr/amr in its id_token.
    • Normalize MFA into a single B2C-controlled claim via claims transformations.
    • Emit that claim in the RP policy so Salesforce receives a consistent MFA indicator and can skip additional MFA.
    • AMR/ACR from upstream IdPs are not a reliable, automatically preserved signal; they should be explicitly mapped and output.

    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.