[英]Microsoft Azure AD graph API, How to get the user mail in response with botbuilder version 4 in node js?
I had created a Azure active directory v1 in azure for the OAuth connection settings to the bot. 我已经为Azure的机器人的OAuth连接设置创建了一个Azure活动目录v1。 I got the user's access token successfully, then I make call to GET https://graph.microsoft.com/v1.0/me with an Authorization: Bearer header.
我成功获取了用户的访问令牌,然后使用Authorization:Bearer标头调用GET https://graph.microsoft.com/v1.0/me 。
{
"@odata.context":
"https://graph.microsoft.com/v1.0/$metadata#users/$entity",
"businessPhones": [],
"displayName": "Ram kumar",
"givenName": "kumaran raju",
"jobTitle": null,
"mail": null,
"mobilePhone": null,
"officeLocation": null,
"preferredLanguage": null,
"surname": "10sa788ad8df-457kdj9dsfs-78d7a8df6a6-7d7a887df7a9",
"userPrincipalName": "something",
"id": "4532523589023895"
}
The above response which I got from that API. 我从该API获得的上述响应。 But I need to access the user's mail property, which gives only null .
但是我需要访问用户的mail属性,该属性仅提供null 。 So, how I get the logged in user's mail from this response?
那么,如何从该响应中获取登录用户的邮件 ?
It means the user does not have the mail
property. 这意味着用户不具有
mail
属性。 The mail
is read-only which is the SMTP address for the user. mail
是只读的,是用户的SMTP地址。 It is tied to Exchange Online, you could not write to that attribute unless you have an Exchange Online license, when you activate a license for the user, Exchange Online will update the field with the correct mailbox mail address during the creation of the user's mailbox. 它与Exchange Online绑定,除非拥有Exchange Online许可证,否则您无法写入该属性,当为用户激活许可证时,Exchange Online将在创建用户邮箱时使用正确的邮箱邮件地址更新该字段。 。
For more details, you could refer to this link . 有关更多详细信息,您可以参考此链接 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.