SharePoint Online: How to Get Direct Link to a Document In Modern Libraries?

Requirement: Get the direct link to a document in SharePoint Online.

I need to share a document with someone but don’t want them to have to navigate through my SharePoint Online site. How do I find the URL for a SharePoint document? Well, there is an easy way to do this! This blog post will show you how to get a direct link to a document in SharePoint Online.

Unlike SharePoint Online’s classic experience, modern document libraries don’t provide a direct link to documents. However, here are the tricks to get a direct link to the file:

  1. Navigate to your SharePoint Online document library, select the file and click on “Copy Link” from the toolbar.
  2. In the link settings popup, select “People with existing access” and click on Apply.
  3. That gets you the link something like:
  4. Remove everything from ?d= and remove /:w:/r (sometimes :/x) and the direct link will be:

However, this method breaks the permission inheritance of the file!

If you have Version history enabled, you can copy the direct link from the latest version of a file. 

sharepoint online direct download link

Method 3: Get the Direct URL of a Document in SharePoint Online from Document Information Panel

Here is another way to get the direct URL of any file in SharePoint Online. Just select the file >> Open the document information panel by clicking on the “i” icon and clicking on the little copy icon under “Path”! This gets you the direct URL of the document in your clipboard!

get direct link to documents in sharepoint online

How do I find the URL of a SharePoint Online Site?

Open any link to your SharePoint Online site in the web browser >> Click on the “Home” link in the navigation (or the icon for the site at the top-left). Now, you can obtain the site URL from your web browser’s address bar. Typically, it looks like:

How do I find the URL of a SharePoint folder?

Navigate to the SharePoint Online Folder in Web Browser >> Click on the “i” icon to open the details pane. Scroll down and click on the little copy icon next to “Path”.

How do I find the document library URL in SharePoint?

Open your SharePoint Online site in Web Browser >> navigate to your Document Library >> Copy the URL in your browser. Typically, it looks like this: You can get the document library URL anything in front of “/Forms/”. (“”, in this case.)

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

6 thoughts on “SharePoint Online: How to Get Direct Link to a Document In Modern Libraries?

  • What happens if using Method 1 but not editing the link at all? I mean, just making the Copy Link and share that URL (with all its arguments and with the :w:/r part).
    Is it necessary to edit the link obtained with Copy Link?
    Thanks for answering.

  • I would like to know how to link to a file/folder on the internal/local drive? This used to be possible via quick links and then as an insert link, but now it is not working (http needed). Help??

  • Both methods don’t seem to work anymore 🙁
    At least not for image files.

    Would be glad to hear about any new way anyone is aware of!

    • Hi David, Confirmed all the above methods just works fine. Let me know what’s the difficulty you are facing.

  • One enormous difference between the two methods described above: in my testing, “Copy link” causes SharePoint to break inheritance for the document’s permissions, which violates Microsoft’s own recommended best practice and potentially creates long-term permissions havoc. Copying the link from Version history, on the other hand, produces a very clean, human-readable link without modifying the document’s permissions.


Leave a Reply

Your email address will not be published. Required fields are marked *