Download file from SharePoint using Microsoft Graph library

Nikhil Tambi 0 Reputation points
2024-10-17T04:45:44.5866667+00:00

Hi Team,

I have a requirement where I need to download an excel file from the SharePoint using Microsoft Graph library. I would like to know is it possible to achieve? if yes, could you please explain me how we can do this?

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2024-10-17T06:46:43.4266667+00:00

    Hi @Nikhil Tambi,

    You could use Content property in DriveItem resource to download a file. Please refer to following api

    GET /drives/{drive-id}/items/{item-id}/content
    

    And here is a issue similar with yours, you could make a reference

    https://learn.microsoft.com/en-us/answers/questions/601256/downloading-file-from-sharepoint-site-folder-using


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.