SOLVED
Home

Get direct download link of a file in OneDrive for Business

%3CLINGO-SUB%20id%3D%22lingo-sub-149766%22%20slang%3D%22en-US%22%3EGet%20direct%20download%20link%20of%20a%20file%20in%20OneDrive%20for%20Business%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149766%22%20slang%3D%22en-US%22%3E%3CP%3EI%20use%20%22Get%20Link%22%20button%20and%20it%20gives%20me%20a%20link%20(like%20below)%20which%20will%20open%20the%20file%20online.%26nbsp%3B%20How%20can%20I%20get%20a%20link%20for%20direct%20file%20download%3F%26nbsp%3B%20Thanks.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ehttps%3A%2F%2F*****-my.sharepoint.com%2F%3Aw%3A%2Fg%2Fpersonal%2F********%2FEXhbZTdvlFRIqyBE8crSXggBW8l_yrcZFPTb5fEpAdzB3g%3Fe%3Di3XdFf%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-149766%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOneDrive%20for%20Business%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-236377%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20direct%20download%20link%20of%20a%20file%20in%20OneDrive%20for%20Business%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-236377%22%20slang%3D%22en-US%22%3E%3CP%3EThat's%20because%20PDF's%20are%20opening%20directly%20in%20your%20browser%20from%20the%20location%20via%20a%20plugin.%20If%20using%20chrome%20you%20can%20use%20this%20method%20to%20cause%20them%20to%20download%2C%20but%20it's%20a%20browser%20thing%2C%20not%20a%20download%20%2F%20server%20thing%2C%20you're%20actually%20downloading%20it%2C%20it's%20just%20your%20browser%20picking%20it%20up%2C%20so%20you%20can%20either%20click%20the%20download%20link%20they%20provide%20in%20the%20plugin%20but%20that's%20the%20only%20way%20to%20get%20pdf's%20to%20download%20outside%20of%20zipping%20them%20etc.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsuperuser.com%2Fquestions%2F30850%2Fstop-pdfs-from-displaying-inside-google-chrome%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsuperuser.com%2Fquestions%2F30850%2Fstop-pdfs-from-displaying-inside-google-chrome%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-236368%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20direct%20download%20link%20of%20a%20file%20in%20OneDrive%20for%20Business%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-236368%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20in%20the%20same.%20Can't%20seem%20to%20get%20it%20to%20work%20on%20PDFs%20which%20is%20the%20main%20file%20type%20I%20need.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-218823%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20direct%20download%20link%20of%20a%20file%20in%20OneDrive%20for%20Business%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-218823%22%20slang%3D%22en-US%22%3EYou%20da%20real%20mvp%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-202245%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20direct%20download%20link%20of%20a%20file%20in%20OneDrive%20for%20Business%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-202245%22%20slang%3D%22en-US%22%3EDepending%20on%20your%20Url%20you%20might%20have%20to%20use%20%3Fdownload%3D1%20but%20this%20won%E2%80%99t%20work%20for%20every%20single%20file%20type%20either%20think%20only%20office%20files.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-202167%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20direct%20download%20link%20of%20a%20file%20in%20OneDrive%20for%20Business%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-202167%22%20slang%3D%22en-US%22%3E%3CP%3EIt%20does%20not%20seam%20to%20work%20for%20me.%20I%20always%20end%20up%20on%20the%20download%20page.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-150108%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20direct%20download%20link%20of%20a%20file%20in%20OneDrive%20for%20Business%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-150108%22%20slang%3D%22en-US%22%3E%3CP%3EChristopher's%20method%20works%20like%20a%20magic.%26nbsp%3B%20It%20also%20works%20with%20%22Anyone%20with%20the%20link%22%20and%20%22People%20in%20my%20org%22%20mode.%26nbsp%3B%20Simply%20add%20%22%3CSTRONG%3E%26amp%3Bdownload%3D1%3C%2FSTRONG%3E%22%20to%20the%20end%20of%20link.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20Christopher%20and%20other%20people%20here%20for%20your%20replies.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-149888%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20direct%20download%20link%20of%20a%20file%20in%20OneDrive%20for%20Business%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149888%22%20slang%3D%22en-US%22%3EWell%20I%20just%20took%20a%20logical%20guess%20and%20it%20totally%20worked%20lol....%20so%20do%20this.%20%3CBR%20%2F%3E%3CBR%20%2F%3EUse%20%22Get%20link%22%2C%20then%20use%20%22People%20with%20existing%20access%22%20to%20get%20the%20direct%20link%20to%20the%20file.%20%3CBR%20%2F%3E%3CBR%20%2F%3EThen%2C%20the%20url%20will%20be%20direct%20path%20to%20%3CA%20href%3D%22https%3A%2F%2Forg.sharepoint.com%2Fpersonal%2Fuser_org%2Ffolder%2Ffilename.ext%3Fd%3Doiuqjaweorihjlkj%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Forg.sharepoint.com%2Fpersonal%2Fuser_org%2Ffolder%2Ffilename.ext%3Fd%3Doiuqjaweorihjlkj%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3ENow%2C%20just%20remove%20everything%20after%20the%20%3F%20and%20put%20in%20download%3D1%20and%20magic%20happens.%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Forg.sharepoint.com%2Fpersonal%2Fuser_org%2Ffolder%2Ffilename.ext%3Fdownload%3D1%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Forg.sharepoint.com%2Fpersonal%2Fuser_org%2Ffolder%2Ffilename.ext%3Fdownload%3D1%3C%2FA%3E%20%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-149821%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20direct%20download%20link%20of%20a%20file%20in%20OneDrive%20for%20Business%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149821%22%20slang%3D%22en-US%22%3EAFAIK%2C%20there%20is%20not%20a%20way%20to%20get%20a%20download%20link%20for%20a%20file%20stored%20in%20SPO%20%2F%20ODFB%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-149782%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20direct%20download%20link%20of%20a%20file%20in%20OneDrive%20for%20Business%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-149782%22%20slang%3D%22en-US%22%3E%3CP%3EWas%20expecting%20to%20see%20some%20controls%2C%20but%20I%20don't%20see%20them%20either%20when%20using%20Azure%20B2B%20guest%20access.%20The%20new%20secure%20sharing%20feature%20for%20OD%2FSPO%20does%20give%20me%20the%20control%20on%20top.%20Workaround%20for%20me%20is%20to%20remove%20the%20last%20part%20of%20the%20URL%2C%20which%20gives%20me%20the%20library%2Ffolder%20view%20and%20there%20I%20have%20the%20option%20to%20select%20the%20file%20and%20click%20on%20the%20download%20button.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
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.

 

https://*****-my.sharepoint.com/:w:/g/personal/********/EXhbZTdvlFRIqyBE8crSXggBW8l_yrcZFPTb5fEpAdzB3g?e=i3XdFf

9 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
Solution
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 https://org.sharepoint.com/personal/user_org/folder/filename.ext?d=oiuqjaweorihjlkj

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

https://org.sharepoint.com/personal/user_org/folder/filename.ext?download=1

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. 

 

https://superuser.com/questions/30850/stop-pdfs-from-displaying-inside-google-chrome

 

 

Related Conversations
Power Query Source from Relative Paths
Magnus Vegem Dahle in Excel on
10 Replies
Teams and Power Query Excel file
Mark_Adams in Microsoft Teams on
6 Replies
MS Teams for Virtual classroom
Tanya Arora in Driving Adoption on
9 Replies
Reading .csv stored in Azure Blob Storage from Excel
Federico Fontana in Excel on
1 Replies
Skype for Business to Teams Adoption Strategy
Tanya Arora in Driving Adoption on
3 Replies