Skip to content
3.0 preview2.3.0 stable

These docs describe the preview. Pick the version you run and every page marks what it doesn't have yet. Get the preview →
Maester 2.x docs (archived) →

Sponsor

(L2) Ensure external domains are restricted in the Teams admin center

CIS.M365.8.2.1MediumTeamsExternal accessPreview 3.0

Part of CIS · Teams · External access · All checks

Run this check
Invoke-Maester -TestId CIS.M365.8.2.1

Federation lets users in other Microsoft 365 and Teams organizations find and message people in your tenant. If every known external domain is allowed, anyone with a tenant in those domains can start chats with your users. That is a common route for phishing and social engineering, because the sender looks like a normal business contact.

Restricting external domains means only the partner domains you choose can communicate with your users. Turning federation off removes the path completely.

  1. Sign in to the Microsoft Teams admin center.
  2. Go to Users > External access.
  3. Next to Teams and Skype for Business users in external organizations, choose Allow only specific external domains, select Add external domains and add the approved domains. To turn external access off instead, choose Block all external domains.
  4. Select Save.
  1. Connect to Teams PowerShell using Connect-MicrosoftTeams.
  2. Run the following commands to allow only specific domains, replacing the example domain with your approved domains. The list replaces the domains that are allowed now:
$domains = [System.Collections.Generic.List[string]]::new()
$domains.Add('partner.example.com')
Set-CsTenantFederationConfiguration -AllowFederatedUsers $true -AllowedDomainsAsAList $domains

Note: Setting AllowFederatedUsers to $false also meets the recommended state.

Every attribute of this check
FieldValue
Test IDCIS.M365.8.2.1
SeverityMedium
SuiteCIS
ProductTeams
FeatureExternal access
AreaExternal access and sharing
Resource typeTenant
User impactMedium
Implementation costLow
MITRE ATT&CKT1566 Phishing
Supports benchmarkCIS Microsoft 365 Foundations Benchmark (version 7.0.0), requirement 8.2.1
Benchmark levelL2
Benchmark profilesE3 Level 2
Supports controlscis-m365:8.2.1, nist-800-53-r5:AC-20
PowerShell testTest-MtCisTeamsExternalDomainsRestricted
ServicesTeams