Forum Discussion
Restrict shareing files in a document library to members of that document library
Hi,
I have a site with multiple document libraries, lets call them Accounts, Managers and General.
Each document library has removed inheritance and the Members and Visitors groups removed and a security group added with edit permission.
e.g. SP_Managers group
Is there a way for me to be able to restrict sharing links to files to only users that already have access to the document library?
i.e. someone in the Managers library can only share a link with others with access to that document library.
In my current case, if someone in the managers library (who is a member of the SP_Managers security group to get access) shares a file with a general user (not in the security group), that general user can not only access the shared document but, can now see the Managers Document library listed in SharePoint (Not any content) which I don't want to happen.
Another option may be to make it so the top level folder isn't visible to non members even if a file is shared (I don't know if that is possible either) but the restricting of sharing would be a better soloution.
Thanks for any advice
Ian
2 Replies
- GittaCopper Contributor
An additional three questions from me in order to understand your situation better.
1. Are there any sensitivity labels in play that might help? --> Really helps in depth with your issue
2. What are the currents sharing setttings for Files and Folders?
3. Could you clarify the "can now see the Managers Document Library listed in SharePoint" part? As in: the user can see the URL of the library?
Regarding to number 2, I've added some pictures of some setting options that might help.Files and Folder links --> You can specify for SharePoint and OneDrive who can access
In addition, if it's set on "Anyone with the link" you can set an expiration date (for instance: access by link expires after 7 days". I myself find that setting an experiation data helps users keep track of what they've shared and what not 😀 (mostly I used 30 days)
Hope this will help or maybe at least dive a bit more into your question it is not possible to restrict sharing links to files to only users that already have access to the document library by default.
Here are a lot of documentation, but i think not what you looking for:
https://learn.microsoft.com/sharepoint/turn-external-sharing-on-or-off?WT.mc_id=DX-MVP-5004845
You can also set the Site sharing settings, but not restricted to existing users:
As an alternative, you can try to use a flow, checks whether the user is authorized or not.
Best, Dave