SOLVED

create teams

Copper Contributor

Hi There

We have started to using Microsoft Teams at our school.

But how do I block students from creating Teams

So it is only the Administrator and the teacher groups.

 

Regards 

Jerry

7 Replies
best response confirmed by VI_Migration (Silver Contributor)
Solution

Hi,

 

What you have to do is to restrict users from creating Office 365 Groups, that will also restrict them from creating Teams.

 

This a easy guide to follow:

http://www.thatlazyadmin.com/how-to-restrict-users-from-creating-new-microsoft-teams-and-office-365-...

You beat me there :)
Yeah, and I didn't send Swedish articles to a Danish (I think) user.. :)

@Linus Cansby 

Hi Linius

 

Now i cant create teams at all.

I am a member in my Security group. "Create Teams"

 

I used this one.:

$GroupName = "Create Teams"
$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

Hi
it works now.
I was only the owner of the Security Group and not a member.

Thanks for the help

@Jerry Sørensen Great! 

1 best response

Accepted Solutions
best response confirmed by VI_Migration (Silver Contributor)
Solution

Hi,

 

What you have to do is to restrict users from creating Office 365 Groups, that will also restrict them from creating Teams.

 

This a easy guide to follow:

http://www.thatlazyadmin.com/how-to-restrict-users-from-creating-new-microsoft-teams-and-office-365-...

View solution in original post