我在 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
声明是在注册期间由以下技术配置文件之一创建的:LocalAccountSignUpWithLogonEmail、SelfAsserted-Social 或 AAD-UserWriteUsingAlternativeSecurityId。它在登录期间不会存在。
关于azure - 如何在 Azure AD B2C 中登录期间禁用 MFA,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53944370/