Get direct download link of a file in OneDrive for Business

Chris Lo
Occasional Contributor

I use "Get Link" button and it gives me a link (like below) which will open the file online.  How can I get a link for direct file download?  Thanks.



13 Replies

Was expecting to see some controls, but I don't see them either when using Azure B2B guest access. The new secure sharing feature for OD/SPO does give me the control on top. Workaround for me is to remove the last part of the URL, which gives me the library/folder view and there I have the option to select the file and click on the download button. 

AFAIK, there is not a way to get a download link for a file stored in SPO / ODFB
Well I just took a logical guess and it totally worked lol.... so do this.

Use "Get link", then use "People with existing access" to get the direct link to the file.

Then, the url will be direct path to

Now, just remove everything after the ? and put in download=1 and magic happens.

Christopher's method works like a magic.  It also works with "Anyone with the link" and "People in my org" mode.  Simply add "&download=1" to the end of link.


Thanks Christopher and other people here for your replies.

It does not seam to work for me. I always end up on the download page.

Depending on your Url you might have to use ?download=1 but this won’t work for every single file type either think only office files.

I am in the same. Can't seem to get it to work on PDFs which is the main file type I need.

That's because PDF's are opening directly in your browser from the location via a plugin. If using chrome you can use this method to cause them to download, but it's a browser thing, not a download / server thing, you're actually downloading it, it's just your browser picking it up, so you can either click the download link they provide in the plugin but that's the only way to get pdf's to download outside of zipping them etc.



@Chris LoI wanted to get a GIF file stored on OneDrive to be shown on another site. I right clicked the file and chose "view online", then right clicked the GIF in the browser and chose "copy image location" which gave me a long URL ending with... CWDi2g/lockar.gif?download&psid=1 where I then removed everything after "lockar.gif".


That worked for me.

which will work assuming you or the users accessing where that image is, are authenticated to your tenant SharePoint :).

Thank you so much, it worked for me. In the past 1 year, my users have trouble downloading compressed folders stored on Onedrive. You can read this problem here:

The problem that people encounter is trying to download a file in the compressed folder and that's when an error occurs. I tried many ways to create direct links from Onedrive like using the embed code but it doesn't work.

Cool to see after all this time. You Probabaly can just do &download=1 without removing the unique tail end of the document url.
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
35 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
9 Replies