Getting Link to a Document with Modern Document Libraries

Frequent Contributor

With the new "modern" document libraries UI it seems almost impossible to get a "normal" link. Meaning a link that is does not contain "guesttoken" and a GUID. But an old school URL with a readable path.

Is the guidance to generate a link using "Get Link" for all link needs? Doesn't seem like there is any other options.


One challenge is that at the time of link generation one needs to determine if the link is for editing or viewing. Based on document lifecycle this may change. For example, I want to send someone a link to a document in an email and to start they are just supposed to view it. Later that person needs to edit the document. Do I need to then send them the Edit link?


I am assuming too that the generated link is to the current location of the document and is not releated to the Document ID feature. So if a document changes location a new link would need to be generated.


It seems this functionality was put in place to facilitate the external sharing features? Maybe? It is admittedly, tripping me and our SharePoint team a bit. We like readable URLS. :)

21 Replies
I am interested in knowing the reasoning behind the changes too. More so for my own knowledge at why the change. :)

I have found that if you are in the modern document library you have the opportunity to use the "Restricted Link" to get the standard URL via the "Get a Link" menu.


Both Edit & View links will create the GUID based links that can be found under People & Groups in Site Settings > Users and Permissions.



I'd like to know how to get a default internal link to the file, but with the Durable ID (successor to the Document ID Service)? In the old DocLib UI you could click the 3 dots and in the popup window above you would get the link plus ?d=GUID for a durable link, but without all the guest token blabla. 

I haven't found a way to get this URL+?d=GUID link in the new UI. Or are we supposed to use the "get link" feature and use the internal restrictions?

This is very annoying - i need to be able to insert links in emails and in other documents. You used to be able to get the URL to an item within a couple of clicks.

It seems to be quite a hassle to send a link to a document. One way I found that is slightly easier is to open the document that you want to share. Then copy the Url from your browser:


You will end up with a bit of an uggly Url but you could display it like this:

My document


Another way is to Sync the Library first. Then within your Onedrive for Business find the file and right click -> OneDrive for Business -> Copy Link. this now results is a decent url and a quick way to share my document:


two ways i have found to get a real url (one that you can read the path)


Get A LInk Method

1. Click Get A Link

2. From Drop select "Restricted Link"

3 Click in box and copy


From Office

1. Open document in Office Client Program

2. Click File

3. Click on path and select "Copy Path"

Caveat is that the url will have the query sting web=1 which i like to remove.


There was an annoucement in the admin messages on August 15th saying that the "Get A Link" feature will soon default to the Restricted link which will save a click and the creation of unneeded guestaccess links.


Here is the article on the update

Anyone know which version the link doesn't cause the permissions for the doc to immediately change?


I really don't understand why the "get a link" feature causes the permissions inheritance for the document to be changed. As noted earlier in the thread, what people want to do is to get a URL for a doc to be able to send to somone else. In most cases they don't need or even want it to expire and they most certainly don't want (or even know) that "getting a link" also means "get a link and change the permissions on the doc".

The "Restricted Link" is the only one that doesn't change permissions.


The out of the box setting is for an Edit link to be created by default. You can change that to the "Direct" link (Restricted) in SharePoint Admin > Sharing


note: updated - the setting should be Direct not Internal as previously posted.


as seen here:


This setting saves a lot of permissions headaches.

I checked and our tenant settings are to "internal" - but when I choose Get a Link, the "Edit Link" the default and I believe immediately breaks the permissions inheritance. If I subsequently choose the View Link or Restricted Link options the doc inheritance is still broken.

Sorry Kevin, my bad, the setting needs to be "Direct" on the farm to avoid the auto generated links that break the permissions.


Also, this only appears to work from a modern document library. Using the feature on a web part seems to break permissions.

Thanks for leading this discussion @Eric Adler.  I appreciate all the information you provided. The key takeaways for me are the bit about the restricted link and the tenant settings for the default link type.  This is the kind of thing that can really impact User Experience.

Another way to get the link is through the version history. Copy the link from the "View Document" of the latest version.

There is a way to disable the 'Edit' and 'View' link feature. The only link that appears then is the restricted link.

Go to site settings -> Site permissions -> Access Request Settings -> Disable Allow members to share the site and individual files and folders.

This would prevent the breaking of permission.

That is excellent!! Anyone have a PowerShell Script for this setting?

Excellent point @Bernd Verhofstadt !  The default Access Request settings are a surprise to most users.  When I provision a site collection I include a link to a document explaining these settings.  I also noticed that at some point MSFT improved the External Sharing Dialog screens in the Admin Center.  The dialog now includes a link that turns off sharing for non-owners.  This dialog also contains a 'Learn more' link that is well written. I will attach a screen snip for readers who are interested. Ext-Sharing-dialog-Admin.pngExternal Sharing Setting in the Admin Center


@Eric Adler the following link is including the right powershell commands.

I prefere to do this on site level. When I changed the settings on tenant (site collection) level, the results where not the same as disabling this setting on (sub)site level.

It is great to have the ability to default this to the restricted link now!!!


Thank you MSFT!!!

:) Question is for how long..
Well... the "Restricted Link" was replaced by the "People with existing access" option - and guess what? It doesn't give you a plain old link anymore...

Ugh!! This is so annoying!

I have developed an SPFx extension to solve this problem. The extension can be easily deployed. Please find more details on this in my blog post. Hope this helps.


sweet alert.png

Hello everyone, I have created an application customizer and it generates the url with id as OOB.

It also generates url with ID for pdf files, which it doesnt do OOB



@Eric Adler