How to reset SharingAllowedDomainList and SharingBlockedDomainList in tenant


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


Set-SPOTenant -SharingAllowedDomainList "" -SharingBlockedDomainList ""


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)
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'.