SOLVED

Setting Sharing Allowed Domain List - SPO PowerShell

Copper Contributor

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.

5 Replies

@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.

I 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.
best response confirmed by Kenneth Conaway (Copper Contributor)
Solution

The limit is indeed 60, as indicated in the documentation: https://docs.microsoft.com/en-us/sharepoint/restricted-domains-sharing

Thanks for the input. Hopefully Microsoft will increase this limit at some point. I'll see if there is a uservoice for this already.
it is in-between increased to 3000 at organizational level and 500 at site level ;)
https://docs.microsoft.com/en-us/sharepoint/restricted-domains-sharing
1 best response

Accepted Solutions
best response confirmed by Kenneth Conaway (Copper Contributor)