Microsoft Graph API Download File content return Unauthorized 401

前端 未结 3 779
甜味超标
甜味超标 2021-01-03 08:42

I\'m trying to download a file from SharePoint Online using an \"app only\" token. I can obtain file info using this url

https://graph.microsoft.com:443/v1.0         


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-03 09:28

    You should use the @microsoft.graph.downloadUrl property obtained from the /v1.0/me/drive/list/items/x/driveItem response to get an app-only url to the file. A GET request wil allow you to download the file.

    See https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/driveitem#instance-attributes

提交回复
热议问题