简体   繁体   English

Office 365 REST API - Outlook用户照片

[英]Office 365 REST API - Outlook User Photo

I'm attempting to retrieve other users' outlook photos using the Office 365 REST API (Preview). 我正在尝试使用Office 365 REST API(预览)检索其他用户的Outlook照片。 The documentation is here on this page: https://msdn.microsoft.com/en-us/office/office365/api/photo-rest-operations . 该文档位于此页面: https//msdn.microsoft.com/en-us/office/office365/api/photo-rest-operations

I'm able to successfully retrieve my own photo using an access token by making the following rest call: 通过进行以下休息调用,我可以使用访问令牌成功检索自己的照片:

GET https://outlook.office365.com/api/beta/me/userphoto/$value

However, when attempting to retrieve the photos of other people in my organization by using this REST call: 但是,在尝试使用此REST调用检索组织中其他人的照片时:

GET https://outlook.office365.com/api/beta/Users('{user_id}')/userphotos('{size}')/$value

I get the following error: 我收到以下错误:

{
     "error": {
        "code": "ErrorAccessDenied",
        "message": "Access is denied. Check credentials and try again."
     }
}

This error isn't listed anywhere in the documentation as far as I can tell. 据我所知,此错误未在文档中的任何位置列出。 I suspect this has something to do with the permissions in Azure but that's only a guess. 我怀疑这与Azure中的权限有关,但这只是猜测。 Maybe it isn't supported in the preview API? 也许它在预览API中不受支持? Anyone have any ideas? 有人有想法么?

nkorai, you are right, the current permission set does not allow you to see others photo. nkorai,你是对的,当前的权限集不允许你看别人的照片。 We are adding a new oauth permission to the exchange online application endpoint which will allow you to do this. 我们正在向Exchange交换在线应用程序端点添加新的oauth权限,允许您执行此操作。 We are in the process of getting this permission enabled. 我们正在启用此权限。 Hopefully in a few weeks. 希望在几周内。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM