How to Disable Users from Sharing Files in SharePoint Online
In SharePoint Online, collaboration is the key, but with that comes the challenge of controlling who can share your data. By default, users with Edit permissions can easily share content, which can be reshared by others, often leading to a chain of uncontrolled access. This endless resharing loop can quickly lead to potential data leaks reaching individuals who should not have access.
Luckily, SharePoint Online offers a robust setting to limit sharing in Microsoft 365. By configuring site sharing restrictions in SharePoint Online, you can ensure that only the right people have access to your files, both internally and externally. This blog will walk you through how to manage access to shared items in SharePoint Online.
There isn’t a straightforward option to limit sharing for those who have ‘Edit’ permissions in files and folders. So as a workaround, you can grant sharing access only to SharePoint site owners. Configuring this setting restricts file and folder sharing permissions to site members, visitors, as well as non-members of the site. However, site members will retain Edit permissions, allowing them to modify items as needed.
There are two ways to stop resharing files and folders in SharePoint Online.
- Disable File & Folder Sharing for Non-Owners in SharePoint Admin Center
- Stop Site, File & Folder Sharing for Non-Owners Using PowerShell
SharePoint Online allows resharing controls only at the site level. There’s no option to disable file/folder resharing at the tenant level in Microsoft 365, except for guest users. To prevent team members and non-owners from sharing content on the site, you need to be either a site owner or site admin.
To access site sharing settings and avoid sharing contents in SharePoint Online, follow the steps mentioned below.
- Go to SharePoint and open the desired site.
- Click on Settings and navigate to Site Permissions –> Change how members can share under ‘Site Sharing’.
- Now, you can see three permissions offered in site sharing settings in SharePoint Online. Select the option which says, Only site owners can share files, folders, and the site.
- Turn off the Allow access requests toggle to completely disable ‘Share’ option.
- Select Save to apply these changes.
Note: If you want to review and allow resharing within the organization, leave the Allow access requests toggle turned on. Once this setting is turned on, site owners will automatically receive an email notification to approve or deny the sharing request.
As a SharePoint administrator or Global Administrator, you can manage sharing access of files and folders in SharePoint Online.
Firstly, connect to the SharePoint Online PowerShell and run the cmdlet below.
Set-SPOSite -Identity <siteurl> -DisableSharingForNonOwners
Running this cmdlet sets the value of the site sharing setting to Only site owners can share files, folders, and the site. This action turns off content and site sharing, along with access requests to non-owners.
Note: Once set, this option can’t be reversed through PowerShell. Site owners would need to update it manually in the SharePoint site sharing settings as mentioned above.
As mentioned before, admins can manage external sharing of SharePoint site content at the tenant level. To stop guests from resharing content they don’t own in SharePoint, follow the steps mentioned below.
- Sign in to the SharePoint admin center.
- Navigate to Policies –> Sharing –> More external sharing settings.
- Uncheck the option Allow guests to share items they don’t own.
- Click Save.
Tips:
- The tenant-level external sharing setting for OneDrive work similarly to those in SharePoint Online, so be sure to configure them accordingly.
- When managing external users in critical projects, admins should follow best practices for sharing files and folders, especially when dealing with anonymous users.
Let’s say a SharePoint site owner shares a folder with edit permission to a non-member of the site.
Now, Rachel can access the shared folder but cannot reshare it. When the “Allow access requests” setting is turned off in the site sharing settings, the Send option is greyed out, preventing her from sending the link to others.
In this case, when Rachel clicks on the Send button, the request is sent to the site owners where they can review and accept the access requests.
The site owner will receive an access request where he can accept or decline the request. If approved, the designated user (e.g., Mike) will receive access to the shared item.
Tip: To effectively manage shared files and folders in SharePoint Online, make use of Microsoft 365 audit logs or the SharePoint file and folder sharing report.
I hope this blog helped you prevent users from sharing files and folders in SharePoint Online. If you have any questions, feel free to reach out in the comments section.