英文:
Enabling Email Address or Phone Number as the user identifier in Azure AD B2C
问题
我们目前正在将我们的一个应用迁移到Azure AD B2C。在现有的应用程序中,用户可以使用他们的电子邮件或电话号码作为用户标识进行登录。我想了解在B2C中是否可以实现相同的功能。
我们目前正在使用基于策略文件的配置。在Azure AD B2C中是否可以实现这一点?
如果您有关于如何实现这一点的任何文档或资源,我将不胜感激。
英文:
We are currently in the process of migrating one of our applications to Azure AD B2C. In the existing application, users are able to log in using either their email or phone number as their user identifier. I am seeking information on whether this same functionality is possible with B2C.
We are currently using policy file based configuration. Is this possible to achieve in Azure AD B2C?
I would appreciate any documentation or resources you may have on how to achieve this.
答案1
得分: 1
是的,在Azure AD B2C中,允许用户使用他们的电子邮件和电话号码作为用户标识符进行登录是可能的。
您可以按照以下步骤创建两个登录策略,一个用于电子邮件,另一个用于电话号码。
- 转到 Azure门户 > 搜索并选择 Azure AD B2C > 身份提供商 > 本地帐户。
-
创建 电话号码 的用户属性,如下所示。
选择用户属性 > 添加。
- 创建一个如下所示的用户流程。
选择用户流程 > 新建用户流程 > 注册和登录。
- 将 电话号码 属性添加到用户流程中,如下所示。
Azure AD B2C > 用户流程 > B2C_1_Signupand-Signin > 用户属性。
- 运行如下所示的用户流程。
- 运行用户流程后,应用程序将显示以下屏幕。
参考:在Azure Active Directory B2C中创建用户流程和自定义策略 以获取有关Azure AD B2C身份验证的更多详细信息。
英文:
> I am seeking information on whether this same functionality is possible with B2C.
Yes, it is possible to allow users to log in using both their email and phone number as their user identifier in Azure AD B2C.
You can follow below steps to create two sign-in policies, one for email and one for phone number.
- Go to Azure Portal >search for and select Azure AD B2C > Identity providers > Local Account.
-
Create user attribute for Phone number as below.
Select user attributes > Add.
- Create a User flow as below.
Select User flows > New user flow > Signup and Sign in.
- Add Phone number attribute to user flow as below.
Azure AD B2C > User flows > B2C_1_Signupand-Signin > User attributes.
- Run the user flow as below.
- Once ran the user flow application will display below screen.
Refer: Create user flows and custom policies in Azure Active Directory B2C for more details about Azure AD B2C Authentication.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论