无法使用 Microsoft Graph 获取其他用户的照片缩略图 API

Unable to get other user's photo thumbnail using Microsoft Graph API

根据这个官方文档List thumbnails for a DriveItem,我们可以使用这个API.

获取OneDrive照片缩略图

当我使用 Microsoft Graph API 发送从我的 OneDrive 获取照片缩略图的请求时,服务器返回 200 并且工作正常。

https://graph.microsoft.com/v1.0/users/{my user id}/drive/items/{my photo object id}/thumbnails

然而,在尝试从其他用户的 onedrive 获取照片缩略图邮件时,服务器返回 404 未找到。

https://graph.microsoft.com/v1.0/users/{other user's id}/drive/items/{other user's photo id}/thumbnails

我确定 其他用户的照片 存在并且 ID 正确。

是我做错了什么,还是对访问其他用户的 OneDrive 照片有限制?

目前,一个用户无法查询另一个用户的OneDrive

您可以通过查询驱动器的根目录来确认。

对于您自己,您将看到驱动器中的文件列表:

https://graph.microsoft.com/v1.0/users/{my user id}/drive/root/children

但是,对于任何其他用户,您将得到一个空集合(即使该驱动器中存在文件)。

https://graph.microsoft.com/v1.0/users/{other user's id}/drive/root/children