Forum Discussion
Setting Sharing Allowed Domain List - SPO PowerShell
I'm having issues trying to set up an allowed domain list for external sharing for one of our sites in SharePoint Online. I have a list of about 80 domains which includes subdomains that we need to add to this list via the Set-SPOSite cmdlet. I keep receiving an improperly formed input allow list error even though the list is space delimited and have checked to make sure each domain is correct. I'm wondering if there is somehow a character limit for the string or if there is a way to do this in a foreach loop to add each domain as a space delimited string? Thank you.
The limit is indeed 60, as indicated in the documentation: https://docs.microsoft.com/en-us/sharepoint/restricted-domains-sharing
5 Replies
- TimLBSteel Contributor
Kenneth Conaway Post a sample of what you're using for the script and redact info that we don't need to see? Best guess might be that you're missing or not using the right quotes that are recognized by powershell.
- Kenneth ConawayCopper ContributorI just did a manual input of what I did and I think I'm reaching a 60 domain limit. If I add a 61st one it throws the error so there must be an upper limit to how many domains are allowed in the list.
The limit is indeed 60, as indicated in the documentation: https://docs.microsoft.com/en-us/sharepoint/restricted-domains-sharing