Disable sharing on SharePoint Online

%3CLINGO-SUB%20id%3D%22lingo-sub-132423%22%20slang%3D%22en-US%22%3EDisable%20sharing%20on%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-132423%22%20slang%3D%22en-US%22%3E%3CP%3EHow%20can%20I%20disable%20sharing%20on%20a%20whole%20site%20collection%20or%26nbsp%3Bthe%20whole%20tenant%26nbsp%3Bfor%20SharePoint%20Online%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20see%20that%20option%20at%20the%20site%20level%2C%20but%20I%20need%20to%20apply%20it%20to%20hundreds%20of%20sites.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-132423%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharing%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-360862%22%20slang%3D%22en-US%22%3ERe%3A%20Disable%20sharing%20on%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-360862%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20had%20this%20issue%20and%20found%20the%20following%20solution%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUnder%20the%20site%20and%20subsite%20we%20had%20sharing%20turned%20off%20(%20i.e.%20Under%20the%20subsite%20we%20went%20to%20site%20permissions%20then%20clicked%20access%20requests%20on%20the%20ribbon%20and%20unticked%20'Allow%20members%20to%20share%20site%20and%20individual%20files%20and%20folders'.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%20staff%20were%20able%20to%20share%20or%20use%20copy%20link%20to%20send%20links%20to%20staff%20who%20did%20not%20currently%20have%20access%20and%20this%20was%20breaking%20folder%20inheritance.%26nbsp%3B%26nbsp%3BStaff%20were%20also%20able%20to%20see%20and%20change%20the%20settings%20of%20the%20site%20and%20document%20libraries.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20default%20'edit'%20permission%20applied%20to%20member%20groups%20is%20apparently%20the%20cause.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20switched%20all%20group%20permissions%20from%20'edit'%20to%20'contribute'.%26nbsp%3B%20This%20removed%20the%20ability%20to%20see%20or%20change%20settings%20on%20the%20site%20or%20document%20library.%26nbsp%3B%20However%20they%20can%20still%20create%2C%20edit%2C%20and%20delete%20files%20and%20folders%20as%20normal.%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20also%20removed%26nbsp%3B%20the%20ability%20to%20share%20or%20send%20links%20to%20anyone%20but%20those%20who%20already%20have%20access.%26nbsp%3B%20They%20can%20send%20the%20share%20email%20but%20if%20the%20staff%20member%20does%20not%20already%20have%20access%20it%20prompts%20them%20with%20a%20'%20You%20do%20not%20have%20permission..'message%20and%20unique%20permissions%20are%20not%20created.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUnique%20permissions%20are%20also%20no%20longer%20created%20when%20the%20user%20who%20receives%20the%20URL%20already%20has%20access.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-132454%22%20slang%3D%22en-US%22%3ERe%3A%20Disable%20sharing%20on%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-132454%22%20slang%3D%22en-US%22%3E%3CP%3EAdding%20to%20David's%20answer%2C%20you%20can%20give%20a%20look%20to%26nbsp%3B%3CA%20href%3D%22http%3A%2F%2Fwww.sharepointusecases.com%2F2014%2F11%2Fmanaging-sharing-access-requests-sharepoint-site%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ewww.sharepointusecases.com%2F2014%2F11%2Fmanaging-sharing-access-requests-sharepoint-site%2F%3C%2FA%3E.%20It's%20an%20old%20article%2C%20but%20still%20valid.%3C%2FP%3E%0A%3CP%3EI%20remember%20some%20time%20ago%20there%20was%20a%20thread%20in%20this%20community%20where%20someone%20shared%20a%20script%20to%20apply%20the%20setting%20to%20multiple%20sites.%20Perhaps%20you%20can%20search%20for%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-132433%22%20slang%3D%22en-US%22%3ERe%3A%20Disable%20sharing%20on%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-132433%22%20slang%3D%22en-US%22%3EYou%20can%20also%20go%20into%20%22Access%20Request%20%26amp%3B%20Invitations%22%20and%20uncheck%20that%20option%20in%20there.%3CBR%20%2F%3E%3CBR%20%2F%3EThese%20are%20all%20workarounds%20as%20there%20is%20no%20real%20way%20to%20disable%20Sharing%20Internally%2C%20since%20SharePoint%20was%20meant%20to%20%22Share%22%20content%20with%20co-workers%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-132432%22%20slang%3D%22en-US%22%3ERe%3A%20Disable%20sharing%20on%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-132432%22%20slang%3D%22en-US%22%3EI%20dont%20think%20there%20is%20an%20option%20to%20disable%20Internal%20sharing.%20The%20best%20thing%20you%20can%20do%20is%20what%20i%20said%20above%20and%20maybe%20try%20some%20CSS%20Changes%3CBR%20%2F%3Eor%20change%20users%20permissions%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-132429%22%20slang%3D%22en-US%22%3ERe%3A%20Disable%20sharing%20on%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-132429%22%20slang%3D%22en-US%22%3EThis%20could%20be%20a%20workaround%2C%20but%2C%20%3CBR%20%2F%3EYou%20can%20just%20change%20the%20users%20to%20Read%20Only%20%2C%20if%20you%20don't%20want%20them%20to%20share%2C%20or%3CBR%20%2F%3E%3CBR%20%2F%3EHow%20about%20you%20hide%20all%20users%20from%20the%20%22Share%22%20box.%20This%20way%2C%20if%20they%20click%20%22Share%22%2C%20they%20wont%20be%20able%20to%20find%20the%20other%20user%20to%20share%20with.%3CBR%20%2F%3E%3CBR%20%2F%3ESet-spotenant%20-ShowAllUsersClaim%20%24false%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-132427%22%20slang%3D%22en-US%22%3ERe%3A%20Disable%20sharing%20on%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-132427%22%20slang%3D%22en-US%22%3E%3CP%3ESorry%2C%20I%20should%20have%20mentioned%20that%20it%20is%20for%20internal%20users.%20I%20want%20to%20prevent%20contributors%20from%20breaking%20permission%20inheritance%20when%20they%20use%20the%20share%20option%20internally.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-132425%22%20slang%3D%22en-US%22%3ERe%3A%20Disable%20sharing%20on%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-132425%22%20slang%3D%22en-US%22%3EDo%20you%20want%20to%20disable%20Sharing%20for%20External%20users%2C%20or%20do%20you%20not%20even%20want%20Internal%20users%20to%20share%20content%3F%3C%2FLINGO-BODY%3E
Highlighted
Frequent 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
Highlighted
Do you want to disable Sharing for External users, or do you not even want Internal users to share content?
Highlighted

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.

Highlighted
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
Highlighted
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
Highlighted
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
Highlighted

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.

Highlighted

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.