SOLVED

How to reset SharingAllowedDomainList and SharingBlockedDomainList in tenant

%3CLINGO-SUB%20id%3D%22lingo-sub-2681712%22%20slang%3D%22en-US%22%3EHow%20to%20reset%20SharingAllowedDomainList%20and%20SharingBlockedDomainList%20in%20tenant%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2681712%22%20slang%3D%22en-US%22%3E%3CP%3EOnce%20I%20updated%26nbsp%3BSharingAllowedDomainList%20and%20SharingBlockedDomainList%20property%20using%20Set-SPOSite%20for%20test%20purpose.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3ESet-SPOTenant%20-SharingAllowedDomainList%20%22example.com%22%20-SharingBlockedDomainList%20%22example.com%22%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20that%20the%20test%20is%20over%2C%20I%20tried%20to%20reset%20these%20properties%20but%20I%20could%20not%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3ESet-SPOTenant%20-SharingAllowedDomainList%20%22%22%20-SharingBlockedDomainList%20%22%22%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20cmdlet%20causes%20an%20error.%3C%2FP%3E%3CP%3E%3CEM%3ESet-SPOTenant%20%3A%20Adding%20an%20empty%20domain%20name%3C%2FEM%3E%3C%2FP%3E%3CP%3EI%20also%20tried%20from%20SharePoint%20Admin%20Center%2C%20but%20could%20not%20clear%20the%20properties.%3C%2FP%3E%3CP%3EHow%20to%20fix%20it%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2681712%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%20Management%20Shell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2681823%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20reset%20SharingAllowedDomainList%20and%20SharingBlockedDomainList%20in%20tenant%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2681823%22%20slang%3D%22en-US%22%3EYeah%2C%20there%20are%20quire%20few%20issues%20like%20that%20with%20SPO%20cmdlets%2C%20goes%20to%20show%20how%20much%20testing%20effort%20they%20put...%20Anyway%2C%20if%20you%20don't%20need%20to%20use%20this%20functionality%20anymore%2C%20set%20SharingDomainRestrictionMode%20to%20'None'.%3C%2FLINGO-BODY%3E
Contributor

Once I updated SharingAllowedDomainList and SharingBlockedDomainList property using Set-SPOSite for test purpose.

 

Set-SPOTenant -SharingAllowedDomainList "example.com" -SharingBlockedDomainList "example.com"

 

Now that the test is over, I tried to reset these properties but I could not it.

 

Set-SPOTenant -SharingAllowedDomainList "" -SharingBlockedDomainList ""

 

The cmdlet causes an error.

Set-SPOTenant : Adding an empty domain name

I also tried from SharePoint Admin Center, but could not clear the properties.

How to fix it?

1 Reply
best response confirmed by karamem0 (Contributor)
Solution
Yeah, there are quire few issues like that with SPO cmdlets, goes to show how much testing effort they put... Anyway, if you don't need to use this functionality anymore, set SharingDomainRestrictionMode to 'None'.