简体   繁体   English

Microsoft.Graph照片检索功能

[英]Microsoft.Graph photo retrieve function

Has anyone been able to get this line to work? 有人能使这条线工作吗?

graphClient.Users["userAddress@email.com"].Photo.Content.Req‌​uest().GetAsync();

I get a timeout. 我超时了。 Also didn't work as a REST Get. 也不能作为REST Get使用。
Could it be a bug in the library? 可能是库中的错误吗?

This operation in version 1.0 supports only a user's work or school mailboxes and not personal mailboxes. 1.0版中的此操作仅支持用户的工作或学校邮箱,不支持个人邮箱。

Please ensure that you were calling this REST using the work or school account and the user have the subscription like Office 365 that making the user own the mailbox. 请确保您使用工作或学校帐户调用此REST,并且用户具有Office 365之类的订阅,使该用户拥有该邮箱。

After meeting above two requirements, this REST works well for me. 满足以上两个要求后,此REST对我来说效果很好。

And if the user didn't have the mailbox, you can get the thumbnail photo for a specified user from the thumbnailPhoto property via Azure AD Graph. 并且,如果用户没有邮箱,则可以通过Azure AD Graph从thumbnailPhoto属性中获取指定用户的缩略图 Here is the request for your reference: 以下是供您参考的请求:

GET: https://graph.windows.net/myorganization/users/{user_id}/thumbnailPhoto?api-version

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

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