Forum Discussion
'Copy Link' and 'Share' create unique permission automatically
johnjohn-Peter I don't think you will be able to change the SharePoint default functionality of "Copy link" option in the document library.
If you want a direct link to SharePoint file to share with users who are already having permissions on the file, follow below steps to get the file URL:
- Go to the document library/folder where your file is uploaded.
- Select the file and click on Open the details pane ( i icon) from command bar (top right side)
- Copy direct link using the copy icon highlighted in below image:
You may need to append ?Web=1 to open file in web browser before sharing it with other users, like (only if when you open the copied link in browser and it is downloading the file instead of opening in the browser):
https://contoso.sharepoint.com/sites/MySite/MyLibrary/MyDocument.docx?Web=1
Additionally, you can hide the "Copy link" option from library command bar using SharePoint JSON view formatting:
{
"commandBarProps": {
"commands": [
{
"key": "copyLink",
"hide": true
}
]
}
}
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
ganeshsanap But informing the user to manually modify the url is not very user-friendly !! i found a better solution using the share instead of copy and chose people with existing access, this will not create unique permissions!
- ganeshsanapFeb 07, 2024MVP
johnjohn-Peter Yes, you can do it using the "share" button for people with existing access/permissions.
And answer to your original question (Do anyone know if there is a way to prevent a file from getting a unique permission if the users want to copy the link?) is --> No, it is not possible to change this SharePoint out of the box behavior.
So, if users are using the "Copy link" button which is causing issues for you - it is better to hide it.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.