Forum Discussion

drewstes1's avatar
drewstes1
Copper Contributor
Aug 23, 2024

OneDrive Direct Download Link

Hi all,

 

My Problem and Question

 

This question pertains to OneDrive for personal use. Microsoft recently made a change to the link format from the embed feature and made my direct download links obsolete. I would retrieve these links from the embed feature in OneDrive and the links looked like what's shown below. The link would directly serve the file to whomever accessed it without them ever having to interact with OneDrive.

 

With the changes Microsoft recently made to OneDrive, is there a new way of getting links that have this functionality?

Old link format (no longer works): https://onedrive.live.com/download?resid=XXXXXXXXXXX&authkey=XXXXXXXXXXX

 

My Own Digging

 

I've scoured several forums unable to find any solutions. I have found a temporary solution; however, the links generated via this method only have temporary authentication, so they expire after a day. Perhaps it could be a real solution if I could figure out how to get a permanent auth token for a personal OneDrive file. I'm retrieving the link from the GET request when clicking the download button on a file from a publicly shared link.

 

Link format: https://my.microsoftpersonalcontent.com/personal/{resid}/_layouts/15/download.aspx?UniqueId=XXXXXXXXXXXXX&Translate=false&tempauth=XXXXXXXXXXXXXXXX&ApiVersion=2.0

 

Thank you to anyone that has input!

 

Resources