Hi Nilesh Karotra,
Thanks for reaching out to Microsoft!
I tried to replicate the scenario on my end and successfully downloaded zip folders using the Graph API endpoint {sites/{site-id}/drives/{drive-id}/items/{id}/content}
.
Could you please try running this endpoint without the filter (?format=zip)
and observe the behavior?
Currently, the Microsoft Graph API does not support downloading an entire folder from a SharePoint site. You can only download zip folders. However, you can upvote this feature request idea, and based on the number of votes received, the Microsoft Engineering team may consider it for future implementation.
If you are looking to download a file uploaded in a document library (driveitem-get-content.). You can use the following Graph API endpoints. These will include the @microsoft.graph.downloadUrl
property in the DriveItem:
GET /sites/{site-id}/drives/{drive-id}/root:/{path-relative-to-root}:/content
GET /sites/{site-id}/drives/{drive-id}/items/{item-id}/content
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.