Guest Access Series: Inviting a Specific Domain into a Specific Team — Allow Domain List for ShareP, er, Teams?

Advanced settings for external sharing for a selected site
Add domains interface for a selected site

Get My Allowed Domain List!

param(
[parameter(Mandatory=$true)]
[string]$siteUrl = "https://{tenant}.sharepoint.com/sites/team1"
)
# Credentials
$myCred = Get-AutomationPSCredential -Name "{Your Automation Credential Name}"
# Parameters
[uri]$siteUri = $siteUrl
$siteHost = $siteUri.Host
$domain = $siteHost.Substring(0, $siteHost.IndexOf("."))
$adminSiteUrl = "https://$($domain)-admin.sharepoint.com"
# Connect to SharePoint Online
Connect-SPOService -Url $adminSiteUrl -Credential $myCred
# Get the Site Collection
$site = Get-SPOSite -Identity $siteUrl
# get site Allow List
$domainsAllowedList = $site.SharingAllowedDomainList
# output list
Write-Output ($domainsAllowedList)

Written as Output to…?

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michael Mukalian

Michael Mukalian

25 Followers

Covering the Microsoft Modern Workplace as a Technical Architect at the Philadelphia Microsoft Technology Center in Malvern.