Suppose you have a Microsoft Teams user base and want to stop some users from creating a team in Microsoft Teams, then this blog is for you. While there is no native way to limit who can create a team without deleting those users, you can set a PowerShell command to inhibit users from creating a team. Using PowerShell will allow you to limit the number of users who can create a team without having to delete them. Read through for more information on how you can limit who can create a team in Microsoft Teams.
The process below is essentially a two-step guide that incorporates creating a group to house all the members who can create a group and leaving the ones that need to be restricted. You will then need to use a PowerShell command to inhibit members external from the group you created to prevent those users from creating a team.
- First, open Office 365.
- From there, use the launcher to open the Admin console.
- Now click the dropdown for “Active teams & groups.”
- After that, click on “Add a group.”
- Choose “Security” in the group type and select “Next.”
- Input the group’s basic details: the name and description fields.
- Then press next.
- Assign a new email to that group and press “Next.”
- Now click on “Create group.”
- Now navigate the “Security” tab and select your new group.
- Click on the “Members” tab and input the members who need to be excluded.
- After that, on your Windows computer, open “Windows PowerShell.”
- Install the PowerShell preview module.
- Once the preview module is installed, input the following command.
- Change the “$GroupName” to your group name, and make sure it’s the same.
- Press enter to run the script.
- Finally, input your login details to finish the verification process.
This process will only work if you have PowerShell enabled on your Windows computer; if you have a Mac OS device, you will need to download the accompanying program onto the desktop to proceed with the steps.
Once the steps above have been implemented, you will have successfully limited the number of users who can create a team in Microsoft Teams. You must also keep in mind that it will also prevent users from creating Office 365 groups; these already can be restricted upon admin request; however, the PowerShell prompt will prevent them from being created for those users. However, if you don’t want users to make their Teams, you may not want those users to create groups in Office 365.
In-depth guide [with screenshots] – How to limit who can create teams in Microsoft Teams
Here is an in-depth guide on limiting who can create teams in Microsoft Teams; if you find that the steps illustrated above are quite difficult to follow, you may find that the in-depth guide will help you more. The guide includes the visual context in the form of screenshots to give you a better understanding of each step and an overview of the UI. Some of the code-related elements are also within this guide; you may require its use in the process.
- First, open Office 365.

For the first step, you need to open Office 365 on your browser; once it’s opened, you will now be able to access the login prompt to use your regular Office login credentials to log into the program.
- From there, use the launcher to open the Admin console.

Nine dots display the launcher tab in the display’s top left corner; simply click on it and click on Admin.
- Now click the dropdown for “Active teams & groups.”

- After that, click on “Add a group.”

- Choose “Security” in the group type and select “Next.”

- Input the group’s basic details: the name and description fields.

- Then press next.

- Now click on “Create group.”

- Now navigate the “Security” tab and select your new group.

- Click on the “Members” tab and input the members who need to be excluded.

- After that, on your Windows computer, open “Windows PowerShell.”

PowerShell is an app on your Windows computer; simply open it to proceed with the steps illustrated ahead. You will need to integrate the tool onto a Mac OS device to proceed with using a Mac device. However, I would highly suggest you use a Windows device to proceed with the steps ahead, as it is a native OS for PowerShell to integrate with.
- Install the PowerShell preview module. “Install-Module AzureADPreview”

- Once the preview module is installed, input the following command.

$GroupName = "<GroupName>"
$AllowGroupCreation = $False
Connect-AzureAD
$settingsObjectID = (Get-AzureADDirectorySetting | Where-object -Property Displayname -Value "Group.Unified" -EQ).id
if(!$settingsObjectID)
{
$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
if($GroupName)
{
$settingsCopy["GroupCreationAllowedGroupId"] = (Get-AzureADGroup -SearchString $GroupName).objectid
} else {
$settingsCopy["GroupCreationAllowedGroupId"] = $GroupName
}
Set-AzureADDirectorySetting -Id $settingsObjectID -DirectorySetting $settingsCopy
(Get-AzureADDirectorySetting -Id $settingsObjectID).Values
- Change the “$GroupName” to your group name, and make sure it’s the same.
Make sure you change the group name before you input the code into PowerShell. You cannot use backspace once the code has been generated.
- Press enter to run the script.
- Finally, input your login details to finish the verification process.

As mentioned earlier, this process will only result if you have PowerShell enabled on your Windows computer; if you have another device, such as a Mac OS device, you will need to download the accompanying program onto the desktop to proceed with the steps.
The process below is the in-depth guide on limiting who can create teams in Microsoft Teams; with screenshots and the actual PowerShell code, you have everything you require to make sure you can restrict users from creating a team in Microsoft Teams. With the steps illustrated above, you’ll be able to limit the number of people who can establish a team in Microsoft Teams. It’s also worth noting that the process shown above will block users from forming Office 365 groups. These may already be limited by admin request, but the PowerShell prompt will prevent them from being established for those users.
Conclusion
When the steps here have been completed, you will have successfully restricted and limited users who can create a team in Microsoft Teams. The process is quite extensive with the number of steps involved; however, they are quite simple with creating a group, and if you have Windows, simply open an app and input a pre-made code before completing the process. However, if you find that the steps above are quite hard to follow or struggle to understand some of the steps illustrated above, simply drop a comment below, and we will address any issues you may have with the process shown above.