azure - 如何在 Azure AD B2C 中登录期间禁用 MFA

标签 azure azure-ad-b2c

我在 Azure AD B2C 的身份框架中使用自定义策略。我有 SignUpOrSignin.xml 和 TrustFrameworkBase.xml 来自定义策略。我在注册期间激活了 MFA,但它也在登录时激活。如何在登录时关闭它?

最佳答案

您可以在注册时执行 MFA 步骤,但不能在登录时执行,只需将 newUser 声明添加为 ClaimsExist 前提条件即可:

<OrchestrationStep Order="7" Type="ClaimsExchange">
  <Preconditions>
    <Precondition Type="ClaimsExist" ExecuteActionsIf="false">
      <Value>newUser</Value>
      <Action>SkipThisOrchestrationStep</Action>
    </Precondition>
    <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
      <Value>isActiveMFASession</Value>
      <Action>SkipThisOrchestrationStep</Action>
    </Precondition>
  </Preconditions>
  <ClaimsExchanges>
    <ClaimsExchange Id="PhoneFactor-Verify" TechnicalProfileReferenceId="PhoneFactor-InputOrVerify" />
  </ClaimsExchanges>
</OrchestrationStep>

newUser 声明是在注册期间由以下技术配置文件之一创建的:LocalAccountSignUpWithLogonEmailSelfAsserted-Social AAD-UserWriteUsingAlternativeSecurityId。它在登录期间不会存在。

关于azure - 如何在 Azure AD B2C 中登录期间禁用 MFA,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53944370/

相关文章:

azure - B2C Web 应用程序 session 生命周期

c# - 无法从程序集 'System.Environment' 加载类型 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

c# - 使用 Azure 函数的简单发布请求

从分配的用户中删除后,Azure AD 用户不再被停用

Azure AD v2 登录的 JavaScript OAuth2 流不提供 access_token

azure-ad-b2c - 将 DefaultValue 设置为 DateTime.Now() 等效项

azure - 如何将 Thingsboard 与 Azure B2C 集成?

php - 如何使用 PHP 验证 Azure 广告 b2c token ?

javascript - 在 Azure Web Apps 或 Azure Functions 上远程调试 Windows Node.js 应用程序

azure - 如何在第一个管道上的阶段完成后运行第二个 azure 管道