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:
- Getting user's driveid
GET https://graph.microsoft.com/v1.0/users/{idOrUserPrincipalName}/drive
- Get items from the root drive
GET https://graph.microsoft.com/v1.0/drives/{driveId}/root/children
- Get items of Microsoft Team Chat Files folder
GET https://graph.microsoft.com/v1.0/drives/{driveId}/items/{itemId}/children
- Download file using the value of @microsoft.graph.downloadUrl field.
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?