可以使用 Microsoft Entra 管理中心或 Microsoft Graph 为用户添加身份验证方法。
注意
出于安全原因,不应使用公共用户联系人信息字段来执行 MFA, 相反,用户应填写用于 MFA 的身份验证方法电话号码。
要在 Microsoft Entra 管理中心为用户添加身份验证方法:
- 至少以身份验证管理员的身份登录到 Microsoft Entra 管理中心。
- 浏览到“标识”>“用户”>“所有用户”。
- 选择要为其添加身份验证方法的用户,然后选择“身份验证方法”。
- 在窗口顶部,选择“+ 添加身份验证方法”。
- 选择方法(电话号码或电子邮件)。 电子邮件可用于自助式密码重置,但不能用于身份验证。 添加电话号码时,请选择电话类型,然后输入格式有效的电话号码(例如“+1 4255551234”)。
- 选择“添加”。
注意
预览体验允许管理员为用户添加任何可用的身份验证方法,而原始体验仅允许更新电话和备用电话方法。
使用 PowerShell 管理方法
使用以下命令安装 Microsoft.Graph.Identity.Signins PowerShell 模块。
Install-module Microsoft.Graph.Identity.Signins
Connect-MgGraph -Scopes "User.Read.all","UserAuthenticationMethod.Read.All","UserAuthenticationMethod.ReadWrite.All"
Select-MgProfile -Name beta
List phone based authentication methods for a specific user.
Get-MgUserAuthenticationPhoneMethod -UserId balas@contoso.com
Create a mobile phone authentication method for a specific user.
New-MgUserAuthenticationPhoneMethod -UserId balas@contoso.com -phoneType "mobile" -phoneNumber "+1 7748933135"
Remove a specific phone method for a user
Remove-MgUserAuthenticationPhoneMethod -UserId balas@contoso.com -PhoneAuthenticationMethodId 3179e48a-750b-4051-897c-87b9720928f7
Authentication methods can also be managed using Microsoft Graph APIs. For more information, see Authentication and authorization basics.