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

Requirement: Get direct link to document in SharePoint Online.

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

  • Navigate to your SharePoint Online document library, select the file and click on “Copy Link” from the toolbar.
  • In the link settings popup, Select “People with existing access” and click on Apply.
    sharepoint online get direct link to document
  • That gets you the link something like: https://crescenttech.sharepoint.com/:w:/r/Documents/2018/ComplianceDeclaration.xlsx?d=wfd7f94f6baf55c2eaeb7e906ebd7ffb5&csf=1&e=Yys7gY
  • Remove everything from ?d= and remove /:w:/r (sometimes :/x) and the direct link will be: https://crescenttech.sharepoint.com/Documents/2018/ComplianceDeclaration.xlsx

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

Get 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 click on the little copy icon under “Path”! This gets you the direct URL of the document to your clipboard!

get direct link to documents in sharepoint online

Salaudeen Rajack

Information Technology Professional with Two decades of SharePoint Experience.

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

  • February 13, 2020 at 6:47 PM

    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.

    Reply

Leave a Reply