en-US office user

Restrict sign in to Teams to accounts in specific tenants

Verified with Microsoft 365/Office 5568.1000 — updated on September 4, 2026

Microsoft 365/Office 5568.1000

Supported on: At least Windows Server 2008 R2 or Windows 7

Path in the GPO console

User Configuration\Administrative Templates\Microsoft Teams

Description

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.

Registry

HKCU software\policies\microsoft\office\16.0\teams

More options available

Options

Tenant IDs:
restrictteamssignintoaccountsfromtenantlist text

Export Builder

BETA

Configure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.

These exports write the registry — this is not a managed GPO.

.reg file

Windows Registry Editor Version 5.00

; Exported from gporais.com
; Policy: Restrict sign in to Teams to accounts in specific tenants
; State: Enabled
; Supported on: At least Windows Server 2008 R2 or Windows 7

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\teams]
"restrictteamssignintoaccountsfromtenantlist"=""
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: Restrict sign in to Teams to accounts in specific tenants
# State: Enabled
# Supported on: At least Windows Server 2008 R2 or Windows 7
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.

$path = 'HKCU:\software\policies\microsoft\office\16.0\teams'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'restrictteamssignintoaccountsfromtenantlist' -Value '' -Type String

Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.

Open the Builder

Embed this policy on your site

What to embed
Theme

Adds one script line: the theme follows your site’s appearance and the height fits the content. If your site blocks scripts, the embed follows the visitor’s system theme.

Preview