Reputation: 3183
I have an attachment link which points to user's onedrive .
https://company-my.sharepoint.com/personal/drive_name/Documents/Microsoft Teams Chat Files/hr.pak
While I can download this file by following series of steps:
GET https://graph.microsoft.com/v1.0/users/{idOrUserPrincipalName}/drive
GET https://graph.microsoft.com/v1.0/drives/{driveId}/root/children
GET https://graph.microsoft.com/v1.0/drives/{driveId}/items/{itemId}/children
Is it possible to translate the url(https://company-my.sharepoint.com/personal/drive_name/Documents/Microsoft Teams Chat Files/hr.pak) to a single graph api call to download the file?
Upvotes: 0
Views: 486
Reputation: 26
Try:
https://graph.microsoft.com/v1.0/drives/DRIVE_ID/root:/FILE_PATH/hr.pak:/content
replace the words in CAPS with your details.
Upvotes: 1