且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

启用了MFA的Azure AD B2C注册-登录策略-自定义登录页面

更新时间:2023-02-16 08:51:41

forceChangePasswordNextLogin仅适用于不支持UI自定义的登录策略.

forceChangePasswordNextLogin only works on the sign-in policy which does not support UI customization.

为了在统一的注册/登录策略中实现类似的功能,您需要自己实现此功能.

In order to achieve similar functionality in the unified sign-up/sign-in policy, you'll need to implement this functionality yourself.

获得相似(尽管不完全相同)功能的一种方法是利用密码重置策略.您将预先创建新用户,并确保配置他们的电子邮件.然后,将他们直接引导至密码重置"策略以进行帐户激活.他们将收到一封包含密码的电子邮件,该密码一旦提供,将允许他们提供设置密码的密码.

One option to achieve similar (albeit not quite the same) functionality is by leveraging the Password Reset policy. You would be creating new users up-front and ensuring you configure their email. You then direct them straight to the Password Reset policy for their account activation. They'll receive an email with a code which once provided, will let them provide set their password.

Azure AD B2C反馈论坛中已经有两个出色的功能,您可以支持:

There's already two outstanding feature asks in the Azure AD B2C Feedback Forum that you can support:

  • Support Force Password Reset
  • Fully Customizable Sign-In Page

更新

对于DIY方法:

  1. 通过为您的后端API设置Azure AD应用程序来创建用户,如下所示: https://docs.microsoft. com/azure/active-directory-b2c/active-directory-b2c-devquickstarts-graph-dotnet
  2. 让您的后端API像该应用程序一样调用Graph API来创建用户:
  1. Create the users by setting up an Azure AD app for your back-end API as outlined here: https://docs.microsoft.com/azure/active-directory-b2c/active-directory-b2c-devquickstarts-graph-dotnet
  2. Have your back-end API call the Graph API like this app does to create the users: https://github.com/AzureADQuickStarts/B2C-GraphAPI-DotNet.git
  3. Send the users directly to the reset password URL /authorize/ url..