Azure active directory MS Graph API不返回用户';s来自Azure AD B2C的电子邮件地址

Azure active directory MS Graph API不返回用户';s来自Azure AD B2C的电子邮件地址,azure-active-directory,microsoft-graph-api,azure-ad-b2c,azure-ad-graph-api,Azure Active Directory,Microsoft Graph Api,Azure Ad B2c,Azure Ad Graph Api,当我使用Microsoft Graph API从Azure AD B2C获取用户时,用户注册的电子邮件地址不会出现在返回的JSON中。尽管中有帖子建议电子邮件地址应存在于除Mail(OtherMail或signInNames)之外的其他字段中,但收到的JSON不包含任何与预期电子邮件地址相关的字段。以下是我为测试用户运行的请求(敏感数据屏蔽): 响应中的JSON是: { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata

当我使用Microsoft Graph API从Azure AD B2C获取用户时,用户注册的电子邮件地址不会出现在返回的JSON中。尽管中有帖子建议电子邮件地址应存在于除Mail(OtherMail或signInNames)之外的其他字段中,但收到的JSON不包含任何与预期电子邮件地址相关的字段。以下是我为测试用户运行的请求(敏感数据屏蔽):

响应中的JSON是:

{
  "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users/$entity",
  "businessPhones": [],
  "displayName": "unknown",
  "givenName": "some",
  "jobTitle": null,
  "mail": null,
  "mobilePhone": null,
  "officeLocation": null,
  "preferredLanguage": null,
  "surname": "user",
  "userPrincipalName": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx@xxxxx.onmicrosoft.com",
  "id": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
尽管如此,当我在Azure AD B2C中看到用户时,电子邮件地址显示在用户列表页面的“用户名”列下:

当我查看用户的个人资料时,电子邮件地址也会显示在“用户主体名称”字段下:


电子邮件来自何处,如何使用MS Graph API获取该电子邮件?

您可以使用Beta endpoint从身份收集中获取用户名

质疑


请检查

v1.0端点是否支持此功能*编辑-看起来它的语法略有不同:
v1.0/users/{userId}?$select=identifies,displayName
10个月后仍然只在beta版中可用?有人知道它什么时候发布吗?
{
  "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users/$entity",
  "businessPhones": [],
  "displayName": "unknown",
  "givenName": "some",
  "jobTitle": null,
  "mail": null,
  "mobilePhone": null,
  "officeLocation": null,
  "preferredLanguage": null,
  "surname": "user",
  "userPrincipalName": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx@xxxxx.onmicrosoft.com",
  "id": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
https://graph.microsoft.com/beta/users/userid?select=identities