Azure AD B2C-使用图谱API填充“身份验证电子邮件" [英] Azure AD B2C - Use Graph API to populate "Authentication Email"

查看:112
本文介绍了Azure AD B2C-使用图谱API填充“身份验证电子邮件"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以通过Azure AD B2C中的Graph API为用户填充电子邮件"字段.用户个人资料下有一个身份验证联系信息"部分,其中有一个电子邮件"字段,当通过Graph API访问时是一个只读字段,无法以编程方式进行填充.我可以使用Graph API填充备用电子邮件".但是,对于重置密码策略(用户单击忘记密码"链接),电子邮件"字段是必填字段,我无法使用重置密码策略中的备用电子邮件"

Is there a way we can populate the "Email" field for the user via Graph API in Azure AD B2C. There is a section "Authentication contact info" under the user profile, which has a field "Email" which is a read-only field when accessed via Graph API and cannot be populated programmatically. I am able to use Graph API to populate the "Alternate email". However for the reset password policy (user clicks the forgot password link), the "Email" field is a required field I am unable to use the "Alternate email" in the reset password policy

推荐答案

目前只能通过Azure AD图修改Authentication contact info: Alternate email .您可以通过发送如下的Patch请求来实现此目的:

Only Authentication contact info: Alternate email can be modified via the Azure AD Graph at this time. You can achieve this by sending a Patch request as follows:

PATCH https://graph.windows.net/yourtenant.com/users/youruser@yourtenant.onmicrosoft.com
{
  "otherMails": [
    "newalternateemail@hotmail.com"
  ]
}

Authentication contact info: Email字段目前只能通过门户进行编辑.

The Authentication contact info: Email field is only editable via the portal at this time.

这篇关于Azure AD B2C-使用图谱API填充“身份验证电子邮件"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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