Disable sharing on SharePoint Online

Iron Contributor

How can I disable sharing on a whole site collection or the whole tenant for SharePoint Online?

 

I see that option at the site level, but I need to apply it to hundreds of sites.

 

Thanks for your help.

7 Replies
Do you want to disable Sharing for External users, or do you not even want Internal users to share content?

Sorry, I should have mentioned that it is for internal users. I want to prevent contributors from breaking permission inheritance when they use the share option internally.

This could be a workaround, but,
You can just change the users to Read Only , if you don't want them to share, or

How about you hide all users from the "Share" box. This way, if they click "Share", they wont be able to find the other user to share with.

Set-spotenant -ShowAllUsersClaim $false
I dont think there is an option to disable Internal sharing. The best thing you can do is what i said above and maybe try some CSS Changes
or change users permissions
You can also go into "Access Request & Invitations" and uncheck that option in there.

These are all workarounds as there is no real way to disable Sharing Internally, since SharePoint was meant to "Share" content with co-workers

Adding to David's answer, you can give a look to www.sharepointusecases.com/2014/11/managing-sharing-access-requests-sharepoint-site/. It's an old article, but still valid.

I remember some time ago there was a thread in this community where someone shared a script to apply the setting to multiple sites. Perhaps you can search for it.

We had this issue and found the following solution:

 

Under the site and subsite we had sharing turned off ( i.e. Under the subsite we went to site permissions then clicked access requests on the ribbon and unticked 'Allow members to share site and individual files and folders'.

 

However staff were able to share or use copy link to send links to staff who did not currently have access and this was breaking folder inheritance.  Staff were also able to see and change the settings of the site and document libraries.

 

The default 'edit' permission applied to member groups is apparently the cause.

 

We switched all group permissions from 'edit' to 'contribute'.  This removed the ability to see or change settings on the site or document library.  However they can still create, edit, and delete files and folders as normal.   

 

It also removed  the ability to share or send links to anyone but those who already have access.  They can send the share email but if the staff member does not already have access it prompts them with a ' You do not have permission..'message and unique permissions are not created.

 

Unique permissions are also no longer created when the user who receives the URL already has access.