Forum Discussion
tienit
Aug 08, 2024Copper Contributor
How to generate a direct download link from the shared OneDrive link
Dear Experts and Supporters I'm a developer working on an issue related to downloading files from OneDrive. Everything was running fine until a few days ago when I reopened my app Here are m...
hlindqvi
Jan 10, 2025Copper Contributor
Indeed, the documented way of encoding of "sharing URL" no longer due to authentication failure: https://learn.microsoft.com/en-us/graph/api/shares-get?view=graph-rest-1.0&tabs=csharp#encoding-sharing-urls
I just started to integrate OneDrive so i can't tell if it ever did, but it seems to have worked until recently:
- https://learn.microsoft.com/en-us/answers/questions/2130053/issues-with-onedrive-direct-link-conversion
- https://github.com/felixrieseberg/onedrive-link/issues/1
- https://www.reddit.com/r/PowerShell/comments/10iyowu/onedrive_creating_a_permanent_download_url_to_a/
- https://stackoverflow.com/questions/76464263/how-to-transform-a-onedrive-download-link-to-a-direct-link-that-does-not-prompt
- https://learn.microsoft.com/en-us/answers/questions/1857874/how-to-generate-a-direct-download-link-from-the-sh
- https://stackoverflow.com/questions/79081685/onedrive-auto-download-link
The proposed workaround using an resid query parameter, i.e. driveItem.id, given in an prior reply, is nonsense.
Can anyone from MS comment on this issue, is there an alternative?