在Azure AD B2C中启用电子邮件地址或电话号码作为用户标识符。

huangapple go评论55阅读模式
英文:

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.

在Azure AD 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中,允许用户使用他们的电子邮件和电话号码作为用户标识符进行登录是可能的。

您可以按照以下步骤创建两个登录策略,一个用于电子邮件,另一个用于电话号码。

  1. 转到 Azure门户 > 搜索并选择 Azure AD B2C > 身份提供商 > 本地帐户

在Azure AD B2C中启用电子邮件地址或电话号码作为用户标识符。

  1. 创建 电话号码 的用户属性,如下所示。

    选择用户属性 > 添加。

在Azure AD B2C中启用电子邮件地址或电话号码作为用户标识符。

  1. 创建一个如下所示的用户流程

选择用户流程 > 新建用户流程 > 注册和登录。

在Azure AD B2C中启用电子邮件地址或电话号码作为用户标识符。

  1. 电话号码 属性添加到用户流程中,如下所示。

Azure AD B2C > 用户流程 > B2C_1_Signupand-Signin > 用户属性。

在Azure AD B2C中启用电子邮件地址或电话号码作为用户标识符。

  1. 运行如下所示的用户流程

在Azure AD B2C中启用电子邮件地址或电话号码作为用户标识符。

  1. 运行用户流程后,应用程序将显示以下屏幕。

在Azure AD B2C中启用电子邮件地址或电话号码作为用户标识符。

参考:在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.

  1. Go to Azure Portal >search for and select Azure AD B2C > Identity providers > Local Account.

在Azure AD B2C中启用电子邮件地址或电话号码作为用户标识符。

  1. Create user attribute for Phone number as below.

    Select user attributes > Add.

在Azure AD B2C中启用电子邮件地址或电话号码作为用户标识符。

  1. Create a User flow as below.

Select User flows > New user flow > Signup and Sign in.

在Azure AD B2C中启用电子邮件地址或电话号码作为用户标识符。

  1. Add Phone number attribute to user flow as below.

Azure AD B2C > User flows > B2C_1_Signupand-Signin > User attributes.

在Azure AD B2C中启用电子邮件地址或电话号码作为用户标识符。

  1. Run the user flow as below.

在Azure AD B2C中启用电子邮件地址或电话号码作为用户标识符。

  1. Once ran the user flow application will display below screen.

在Azure AD B2C中启用电子邮件地址或电话号码作为用户标识符。

Refer: Create user flows and custom policies in Azure Active Directory B2C for more details about Azure AD B2C Authentication.

huangapple
  • 本文由 发表于 2023年3月8日 16:38:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/75670878.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定