How to Get Direct or Permanent Link for OneDrive Files?

OneDrive is one of the most popular cloud file storage service developed by Microsoft. You can easily share the files and folders that you store in OneDrive by creating share link. But how to get direct/native link for OneDrive files? How to get permanent link for OneDrive files?

What’s the use of direct/permanent link? Direct link is very useful while you want to provide a download link, anyone can download a file by clicking the direct link. And, for a website, it’s very important to have direct file link for downloadable items. Users don’t have to leave the website to download a file.

Get Direct/Permanent Link for OneDrive Files

Follow the two simple steps to get OneDrive permanent link or OneDrive direct link to file –

1. Open OneDrive and Copy Embed Code

To get embed code, open OneDrive and open the file folder and then select the file you want to share. And then right-click mouse on the file. From the options, click on “Embed” (see the picture below).

Get OneDrive Embed Link Right Click

After this, embed code will be generated for the file. Copy (Ctrl + C to copy) the embed code by clicking on it.

OneDrive Embed Link Generated

If you have copied the embed code, go to step 2. Can’t get the embed code yet? There is another way to get the embed code! After selecting the item you want to share, click on the dots as seen in the picture.
And then click on the “Embed” from the options.

Get OneDrive Embed Link Top Bar

The embed code will be generated for the file, copy the embed code for the file.

2. Paste the Embed Code and Modify

Now paste the embed code you copied in a notepad or a text editor. This code looks like this one –

<iframe src="" width="98" height="120" frameborder="0" scrolling="no"></iframe>

You have to modify this code, remove everything except source URL of the file and then just replace embed with download to get direct/permanent link. After this modification, the link should look like this –

That’s the OneDrive direct or native link for the file and its a permanent link. So you can use the link for lifetime! The direct/permanent link will skip the Google Drive web viewer. You can test the link we shared. It should start download without going OneDrive website.

You can get OneDrive direct/permanent/native link for any file by this process. The best thing is, OneDrive provides permanent links for large files also, where Google Drive doesn’t provide for large files. There is no way to skip Google Drive web viewer for large files (larger than 100MB).

Hope for the best! Let’s discuss through comments 🙂

11 Comments on this.

  1. Hi,

    How can i bulk export the direct link for files in a onedrive for business folder ? For example I have 1000 photos in the onedrive folder and I want the direct link for each photo to be exported to excel.

    Muhamed Rafeeq

  2. Thank you! I had gotten myself to the embed link but hadn’t thought of modifying “embed” in the URL to “download”. Love the help!

  3. Hi,

    This won’t work for me. Each time I click the link it says Opens onedrive and says “This page can’t be opened in the OneDrive app. Do you want to open it in your browser?” and then when I click to open in browser the page says “This link has been removed”

    What am I doing wrong (This is a vCard I am trying to download)

    • We’ve tested the link we provided from mobile and desktop, it’s working as expected. Have you tested the link given in the article? If it’s not working for you, then please reply.

  4. Great, it works (for a file)!
    But can we do the same to a folder?
    Downloading a folder in OneDrive results in an archived file.

Leave a Reply

Email address will not be published. Remember to keep comments follow our guidelines.