Skip to main content

Hinder Users from Creating Teams Outside of Teams Manager

Updated over 5 months ago

Teams Manager allows you to configure a detailed, streamlined governance infrastructure that will keep your tenant tidy and ensure that you have proper Naming, Lifecycles, and Access across all Spaces.

In order to ensure that the Teams created on your tenant actually adhere to this infrastructure, it's important to restrict Team Creation strictly to Teams Manager.

Since Microsoft doesn't offer a direct way to disallow users from creating Teams, we'll resort to a clever PowerShell workaround that will restrict Team Creation to a select group of people.

πŸ’‘ Keep in mind that the method described below also restricts users from creating SharePoint, Planner, and Yammer groups.

πŸ” Create a Security Group


The first thing we need to do is specify users who will retain their Group Creation rights. We'll achieve this through a Security Group.

  1. Navigate to your Microsoft 365 Admin Center.
    ​

  2. Go to Groups > Active Groups > Add a Group.
    ​

  3. Select Security.
    ​

  4. Add the users who will retain their Group Creation rights.
    ​

  5. Copy the Group's name into a separate text document or simply remember it, since we'll need it later on.

▢️ Install PowerShell Modules


Now that you've created your Security Group, we'll set up the Microsoft Graph API module that will allow us to impose the desired restrictions.

Open PowerShell as an Administrator, paste in the text specified below, and press Enter on your keyboard to run the command.

Install-Module Microsoft.Graph -Scope CurrentUser Import-Module Microsoft.Graph Connect-MgGraph -Scopes "Directory.ReadWrite.All", "Group.Read.All"

⛔️ Block Team Creation


Finally, once all of the prerequisites have been met, we can get to actually blocking Team Creation for our employees.

Once again, open PowerShell as an Administrator and paste in the text specified below, making sure to change "YourSecurityGroupName" to the name of the Group we've created earlier.

$GroupName = "YourSecurityGroupName" $groupId = (Get-MgGroup -Filter "displayName eq '$GroupName'").Id $template = Get-MgDirectorySettingTemplate | Where-Object {$_.DisplayName -eq "Group.Unified"} $setting = $template | New-MgDirectorySetting $setting.Values | ForEach-Object { if ($_.Name -eq "EnableGroupCreation") { $_.Value = "false" } if ($_.Name -eq "GroupCreationAllowedGroupId") { $_.Value = $groupId } } New-MgDirectorySetting -DirectorySetting $setting

πŸ’‘ Keep in mind that these changes aren't instant and could take up to 24 hours to take effect.

πŸ… Final Results


Once the changes have taken effect:

  • Users who aren't a part of your Security Group will be disallowed from creating Teams and other Spaces.

  • The only way to create a Team or a different Space will be through a Teams Manager request.

  • Users who were a part of your Security Group will retain the ability to create Teams and Spaces outside of Teams Manager.

⛑️ Need more help?


Get further assistance with Teams Manager through our support chat widget within the app, or reach out to us at [email protected].

Did this answer your question?