Microsoft Graph 用户端点不 return otherMails-属性
Microsoft Graph user endpoint does not return otherMails-property
我在搜索这样的用户时试图获得 属性 otherMails
:
https://graph.microsoft.com/v1.0/users?$filter=startswith(givenName, 'anna')&$select=displayName,otherMails
但是,响应不包含 otherMails
:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(displayName,otherMails)",
"value": [
{
"displayName": "Anna Karenina",
"otherMails": []
}
]
}
用户在 Azure AD 中设置了 属性:
我做错了什么?根据文档,此 属性 应在 $select
返回:https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0
A list of additional email addresses for the user; for example: ["bob@contoso.com", "Robert@fabrikam.com"].
NOTE: This property cannot contain accent characters.
Returned only on $select. Supports $filter (eq, not, ge, le, in, startsWith).
要能够读取 otherMails
,您需要添加 User.Read.All
权限,允许该应用读取其他用户的完整配置文件属性、报告和经理。
资源:
我在搜索这样的用户时试图获得 属性 otherMails
:
https://graph.microsoft.com/v1.0/users?$filter=startswith(givenName, 'anna')&$select=displayName,otherMails
但是,响应不包含 otherMails
:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(displayName,otherMails)",
"value": [
{
"displayName": "Anna Karenina",
"otherMails": []
}
]
}
用户在 Azure AD 中设置了 属性:
我做错了什么?根据文档,此 属性 应在 $select
返回:https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0
A list of additional email addresses for the user; for example: ["bob@contoso.com", "Robert@fabrikam.com"]. NOTE: This property cannot contain accent characters. Returned only on $select. Supports $filter (eq, not, ge, le, in, startsWith).
要能够读取 otherMails
,您需要添加 User.Read.All
权限,允许该应用读取其他用户的完整配置文件属性、报告和经理。
资源: