Azure AD B2C,以编程方式获取MFA验证的电话号码 [英] Azure AD B2C, get MFA verified phone number programmatically

查看:69
本文介绍了Azure AD B2C,以编程方式获取MFA验证的电话号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用B2C策略在Web应用程序中创建用户并使用MFA号码时,该号码将存储在门户网站的身份验证联系信息"下.据我所知,它没有存储在索赔中.

When I create a user in my web app using a B2C policy, and use a number for MFA, that number gets stored under "Authentication Contact Info" in the portal. It does not get stored in the claim from what I can see.

如何通过编程方式访问此号码?例如,如果我要访问我要使用的用户姓氏:

How can I access this number programmatically? If I wanted to access for example the users surname I'd use:

var identity = (ClaimsPrincipal)Thread.CurrentPrincipal;
var name = identity.Claims.Where(c => c.Type == ClaimTypes.Surname).Select(c => c.Value).SingleOrDefault();

是否可以使用上述方法或使用Graph API的任何其他方法来访问MFA期间使用的存储电话号码?

Is there any way, like above or any other way like for example using Graph API, to access the stored phone number used during MFA?

推荐答案

据我所知,无法检索MFA的电话号码.我们只能通过Azure AD Graph API(请参阅

As far as I know, it is not possible to retrieve the phone number for the MFA. We can only get the telephoneNumber(The primary telephone number of the user's place of business.) through the Azure AD Graph API( refer here).

如果希望Azure AD图也支持MFA的电话号码(身份验证联系信息),则可以从

If you want the Azure AD Graph also support for the phone number(Authentication Contact Info) of for the MFA, you can submit the feedback from here.

这篇关于Azure AD B2C,以编程方式获取MFA验证的电话号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆