【问题标题】:Acessing Sharepoint sites content using graph api使用图形 api 访问 Sharepoint 站点内容
【发布时间】:2020-04-17 09:12:34
【问题描述】:

我想从我的组织 SharePoint 下载一些视频内容。我已按照以下步骤操作。

  1. 通过邮寄至https://login.microsoftonline.com/common/oauth2/token 获得不记名令牌。
  2. 然后我可以使用https://graph.microsoft.com/v1.0/sites 访问graphapi。

我想知道在此之后如何访问我的视频内容以及如何下载或播放它。

【问题讨论】:

    标签: azure sharepoint azure-ad-graph-api


    【解决方案1】:

    您应该参考Download the contents of a DriveItem 获取存储在Sharepoint 中的文件的内容。

    GET https://graph.microsoft.com/v1.0/sites/{siteId}/drive/items/{item-id}/content
    

    响应将包含文件的预验证下载 URL。只需使用此网址下载即可。

    【讨论】:

    • 在发送此请求graph.microsoft.com/v1.0/sites{site_id}/drives/items 我收到“消息”:“提供的驱动器 ID 似乎格式错误,或不代表有效驱动器。”,
    • @NayanSharma 您应该首先调用GET https://graph.microsoft.com/v1.0/sites/{siteId}/drives 列出驱动器ID。然后使用GET https://graph.microsoft.com/v1.0/sites/{siteId}/drives/{driveId}/items
    猜你喜欢
    • 2023-02-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-08
    • 1970-01-01
    • 2020-02-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多