Nayan Sharma
Nayan Sharma

Reputation: 33

Acessing Sharepoint sites content using graph api

I want to download some video content from my organization SharePoint. I have followed the below steps.

  1. Got bearer token by making a post call to https://login.microsoftonline.com/common/oauth2/token.
  2. Then i am able to access graphapi using https://graph.microsoft.com/v1.0/sites.

I want to know how can i reach my video content after that and how can i download it or play it.

Upvotes: 1

Views: 126

Answers (1)

Allen Wu
Allen Wu

Reputation: 16458

You should refer to Download the contents of a DriveItem to get the content of the file stored in Sharepoint.

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

The response will contain a pre-authenticated download URL for the file. Just use this url to download it.

Upvotes: 1

Related Questions