Requirement: Get the direct link to a document in SharePoint Online.
SharePoint Online: Get Direct Link to Document
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:
Method 1: Using Copy Link
- 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.
- 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!
Method 2: Get Direct Link to File in SharePoint Online from Version History
If you have Version history enabled, you can copy the direct link from the latest version of a file.
Method 3: 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!