如何使用 Graph API 获取 SharePoint Online 列表项目附件?

Roh*_*mar 5 sharepoint-online microsoft-graph-api

对于 SharePoint Online 任何列表中的附件项目,图形资源管理器只能获取包含值 \xe2\x80\x9ctrue\xe2\x80\x9d 或 \xe2\x80\x9cfalse\xe2\x80\x9d 的 Attachments 属性。

\n\n

我无法获取所附图像、pdf、文本等的链接。

\n\n

使用 Rest API,我们可以轻松扩展并获取附加链接。但是,使用 Graph Explorer 我们无法扩展 Attachments 属性。我需要帮助,我们如何使用 Graph API 获取 SharePoint Online 列表中的附件链接。

\n\n

我在 Graph Explorer 中尝试过以下查询: \n https://graph.microsoft.com/v1.0/sites/ {site-id}/lists/{list-id}/items/{item-id}

\n\n

附件:真实

\n

Vad*_*hev 4

遗憾的是,尚不支持ListItem通过 Microsoft Graph API 检索附件详细信息。

但您可以为此求助于SharePoint REST API ,例如:

GET https://{tenant}.sharepoint.com/_api/web/lists/getbytitle('{list-title}')/items({item-id})?$expand=AttachmentFiles
Run Code Online (Sandbox Code Playgroud)

  • 图表 API 有更新吗? (3认同)