Restrict sign in to Teams to accounts in specific tenants
| Registry value | restrictteamssignintoaccountsfromtenantlist |
| Group Policy | Restrict sign in to Teams to accounts in specific tenants |
| German version | Anmeldung bei Teams auf Konten in bestimmten Mandanten einschränken |
| Intune settings catalog | Restrict sign in to Teams to accounts in specific tenants (User) |
| Scope | User · HKCU |
| ADMX | Teams.admx · String_Teams_SignInRestriction_Policy |
Group Policy path
Registry
| Value | Data |
|---|---|
HKCU\Software\policies\microsoft\office\16.0\teams | |
| restrictteamssignintoaccountsfromtenantlist | text |
Not configured = the value does not exist – the application default applies and users may change the setting.
PowerShell
Check the current value (read-only)
# --- Settings ---
$root = 'HKCU:' # other signed-in user (elevated): 'Registry::HKEY_USERS\<SID>'
$key = "$root\Software\policies\microsoft\office\16.0\teams"
foreach ($name in @('restrictteamssignintoaccountsfromtenantlist')) {
try { '{0} = {1}' -f $name, (Get-ItemPropertyValue -Path $key -Name $name -ErrorAction Stop) }
catch { '{0}: not configured' -f $name }
}Admin rights needed: HKCU\Software\Policies is read-only for standard users. An elevated session writes to the admin's own HKCU – to set it for another signed-in user, change $root to Registry::HKEY_USERS\<SID>.
Enable
# --- Settings ---
$root = 'HKCU:' # other signed-in user (elevated): 'Registry::HKEY_USERS\<SID>'
try {
$key = "$root\Software\policies\microsoft\office\16.0\teams"
if (-not (Test-Path $key)) { New-Item -Path $key -Force -ErrorAction Stop | Out-Null }
New-ItemProperty -Path $key -Name 'restrictteamssignintoaccountsfromtenantlist' -PropertyType String -Value '<value>' -Force -ErrorAction Stop | Out-Null # your value
'Done.'
}
catch { Write-Error "Failed: $($_.Exception.Message)" }Reset to Not configured
# --- Settings --- $root = 'HKCU:' # other signed-in user (elevated): 'Registry::HKEY_USERS\<SID>' $key = "$root\Software\policies\microsoft\office\16.0\teams" Remove-ItemProperty -Path $key -Name 'restrictteamssignintoaccountsfromtenantlist' -ErrorAction SilentlyContinue 'Policy values removed (Not configured).'
Intune (settings catalog)
Restrict sign in to Teams to accounts in specific tenants (User)
Settings catalog → Add settings → search for the name above.
Intune Settings Catalog Viewer ↗
Alternative: custom profile (OMA-URI)
| OMA-URI | ./User/Vendor/MSFT/Policy/Config/Teamsv3~Policy~L_Teams/String_Teams_SignInRestriction_Policy |
| Data type | String |
| Value | <enabled/> · <disabled/> |
This policy has options: add one <data id="…" value="…"/> per element after <enabled/>. The element IDs are in the ADMX file.
Cloud Policy
Cloud Policy (config.office.com → Customization → Policy Management) offers many user policies of the Microsoft 365 Apps – search for Restrict sign in to Teams to accounts in specific tenants. It also applies to unmanaged devices and wins over GPO and Intune for the same setting.
Microsoft explanation
This policy setting allows you to control the accounts that can be used in Teams on managed devices running Windows.
If you enable this policy setting, users will only be allowed to sign in with accounts from Azure Active Directory (Azure AD) tenants that you specify. You can enter a comma separated list of tenant IDs.
The policy setting applies to all ways that the user signs in, including first and additional accounts on versions of Teams that support multiple accounts side by side.
The policy setting is also enforced when users sign out and sign back in.
If you disable or don't configure this policy setting, Teams will continue to allow users to sign in with work or school accounts, or personal Microsoft accounts.
Important: This policy setting only restricts which users can sign in. It does not restrict the ability for users to be invited as a guest in other Azure AD tenants, or switch to tenants they were invited to.
Note: This policy does not apply to Teams web app.
Same category: Microsoft Teams
- Prevent Microsoft Teams from starting automatically after installationpreventfirstlaunchafterinstall
All policies in this category · All 2 policies of Teams.admx