使用Microsoft Graph库获取Azure密码重置身份验证手机属性



我们如何查询Azure目录并获取用于密码重置的身份验证号码。使用Microsoft Graph库公开的不是手机号码。我们正在使用MVC 5,C#VS2017。
谢谢蒂姆:

当前,我们使用以下代码获取用户属性,但是,密码重置期间使用的电话号码不存在。

// Get the current user's profile.
public async Task<List<ResultsItem>> GetMe(GraphServiceClient graphClient)
{
    List<ResultsItem> items = new List<ResultsItem>();
    // Get the current user's profile.
    User me = await graphClient.Me.Request().GetAsync();
    if (me != null)
    {
        // Get user properties.
        items.Add(new ResultsItem
        {
            Display = me.DisplayName,
            Id = me.Id,
            Properties = new Dictionary<string, object>
            {
                { Resource.Prop_Upn, me.UserPrincipalName },
                { Resource.Prop_Id, me.Id }
            }
        });
    }
    return items;
}

是的,不幸的是,您当前无法使用Microsoft Graph来编程设置强验证属性,该验证属性用于自我服务密码重置和多因素身份验证。

这是一个经常要求的功能,它在我们的积压列表上,我希望尽快交付,但是当它可用时我无法提供特定的时间表。

相关内容

最新更新