Tutorial: How to prevent new Microsoft Teams from being created?

Tutorial: How to prevent new Microsoft Teams from being created?

By design, anyone can create new teams in Microsoft Teams .

In this blog I will explain how you can prevent new Microsoft Teams from being created. For some specific users we will allow Teams to be created.

Thanks to an AD group, after the activation of this blog it will be possible to give users the rights to belong to the group of Teams creators.


Why would you block the creation of Microsoft Teams ?

Mailboxes are not created by everyone in your organisation. This may be one of the reasons for not allowing users to create Teams .

If you want to create permanent Teams and do not want to allow everyone to create Teams .

Technical preparations

This article is based on the instructions provided by Microsoft.

Install AzureADPreview

Open Powershell as Administrator

If you still have the old AzureAD module, you can uninstall it via: Uninstall-Module AzureAD

Install-Module AzureADPreview

Create a Azure AD group

Browsego to https://portal.azure.com
Navigate to Azure Active Directory


Create a group , for example: 'Teams Creation'.


Add members who should be able to create Teams


Connect AzureAD

Connect to PowerShell to Azure Active Directory

Login to AzureAD in PowerShell


Good, you are logged in.

Copy this string into PowerShell:

$GroupName = "Teams Creation"

Technical implementation

Create a PowerShell script

Copy the text below into a notepad document and save it as PS1.

The only adjustment you need to make is in the first line. Copy the group name between the brackets.

You can also copy this script from Microsoft Docs: https://docs.microsoft.com/en-us/microsoft-365/admin/create-groups/manage-creation-of-groups?view=o365-worldwide

$GroupName = "Teams Creation"
$AllowGroupCreation = "False"
$settingsObjectID = (Get-AzureADDirectorySetting | Where-object -Property Displayname -Value "Group.Unified" -EQ).id
$template = Get-AzureADDirectorySettingTemplate | Where-object {$_.displayname -eq "group.unified"}
$settingsCopy = $template.CreateDirectorySetting()
New-AzureADDirectorySetting -DirectorySetting $settingsCopy
$settingsObjectID = (Get-AzureADDirectorySetting | Where-object -Property Displayname -Value "Group.Unified" -EQ).id
$settingsCopy = Get-AzureADDirectorySetting -Id $settingsObjectID
$settingsCopy["EnableGroupCreation"] = $AllowGroupCreation
$settingsCopy["GroupCreationAllowedGroupId"] = (Get-AzureADGroup -SearchString $GroupName).objectid
else {
$settingsCopy["GroupCreationAllowedGroupId"] = $GroupName
Set-AzureADDirectorySetting -Id $settingsObjectID -DirectorySetting $settingsCopy
(Get-AzureADDirectorySetting -Id $settingsObjectID).Values

Start the script from the file location

  • I have put this script in C:scripts
  • Navigate to the path.

The script has been completed

You will see an ID appearhere


Check if the script is working?

(Get-AzureADDirectorySetting -Id $settingsObjectID).Values

Please also check Teams if your recently added members can now create Teams .

That is it!

If you want to add people additionally you can do so via Azure Active Directory.


Also read

How to prevent users from deleting tasks from others in Microsoft Planner
These are the 10 success factors when setting up Microsoft Teams
How to activate the weatherman mode or presenter mode in Microsoft Teams?



Welcome to 365tips.be. On this website you can read articles and experiences about Office 365 with focus on Microsoft Teams. Feel free to ask me a question and I will answer it in a blog post. Help others by giving feedback at the bottom of the articles. This blog is made in Dutch. The multilingual website is offered with best-effort machine translation.
0 0 votes
Product review
Please let us know if there are
2 Responses
Latest Most Voted
Inline feedbacks
See all comments
1 year ago

Hi, I've done this like the manual says, but now no one can join an external team. Any idea how to activate that?

Would love to know your thoughts, please leave a comment.x
%d bloggers liked this: