无法通过 Microsoft Graph 访问 SharedWithMe 文件夹 api

Cannot access SharedWithMe Folders via microsoft graph api

我正在尝试下载 v1.0 reference guide 之后的共享文件夹的项目。我可以使用 /v1.0/me/drive/sharedWithMe 请求检索基本详细信息。

sharedWithMe 响应

但是,当我尝试使用 '/drives/remoteItem.driveId/items/id' 请求请求文件夹的内容时,我收到 'itemNotFound' 错误代码。

/drives/b!SuVijei8UUiLXWR4XeJPFe-SS3gbCDVJuXZLcatX7Ikm3BPqZMVJTLOW4rsDD7B2/items/01GB75254SYRXS4C7C25HLIWFMXFY7HWB3

"error": {
"code": "itemNotFound",
"message": "The resource could not be found.",
"innerError": {
  "request-id": "2a0591bd-6fdf-4bf8-a5f3-baca24fd1930",
  "date": "2016-08-29T14:03:25"
}

知道发生了什么事吗? 谢谢!

编辑: 我能够使用“/drives/remoteitem.parentReference.driveId/items/remoteItem.id/children”检索 SharedWithMe 文件夹数据 使用 Files.Read.All 的范围似乎也很重要(目前似乎没有记录)

看起来你快到了。您只需要 /content 段。

预计:/drives/remoteItem.parentReference.driveId/items/id/content

你的实际:/drives/remoteItem.parentReference.driveId/items/id

您将被重定向到资源以供下载。我认为应该更新文档

为了确认,基础 url 有点不同:

获取分享内容:/v1.0/drives/drive-id/items/item-id/content

获取共享项目列表:/v1.0/me/drive/sharedWithMe