I'm trying to download a SharePoint file from the MS Graph /drive/items/xxxx
API endpoint. The link I have is in the format https://company-my.sharepoint.com/personal/drive_name/_layouts/15/WopiFrame.aspx?sourcedoc=%7B<GUID>%7D
, but the graph API needs some other OneDrive file ID to successfully fetch file metadata.
I have the correct permission scopes, and if I enumerate drive contents I can see the file there.
Is there any way to convert the sourcedoc
guid into what is required by the API, or alternatively get file metadata by SharePoint guid?