Teams How to create a team control authority

Brought to you today is how to subscribe to this article below to control who can create a team who can not create a team, all active users by default a Office365 subscription can create a team, then creates a problem, this team will become very large, Office365 group will be very much, of course, SharePoint sites have increased, it will bring a lot of problems, such as: Office365 Office365 administrator can not maintain a friendly group, occupied much of the team SharePoint space and so on. If not controlled, then the team will be whoever who wants to create creation, such as our Office365 subscription now have a lot of team this is a waste of resources Office365.image.png

So as the title of this article, how to control the rights to create a team do? Before I share with you an article in "to analyze the relationship Teams and Office365 group", each team corresponds to the Office365 in a group and team sites, as long as the control group and users to create SharePoint site permissions can be.

First is under the control of group permissions to create it, all users can create groups by default, if you want to create a group of people can not, then we need to first create a security group Office365, this part of the user to go into security groups by authorized security groups to achieve the purpose of creating groups is not allowed, so that the user security groups can not be created naturally Office365 group, or create a team.

First, create a security group in the Office365image.png

Adding a group memberimage.png

The next step is authorization for this group, and authorization is required to operate through the PowerShell command line, the first to use an Administrator, open Powershell, and online installation module AzureAD

Install-Module AzureADPreviewimage.png

Next, make a PS script, the script reads as follows:

$GroupName = "Lock"

$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

}

 

Set-AzureADDirectorySetting -Id $settingsObjectID -DirectorySetting $settingsCopy

 

(Get-AzureADDirectorySetting -Id $settingsObjectID).Values

The above information is saved as a name PS1 file, note that $ GroupName is the group you want to configureimage.png

Then execute this file in PowerShell PS1 or in PowerShell ISEimage.png

The end result EnableGroupCreation parameter is False, meaning that the state allows you to create groups to False, so that this group of users in which the naturally Teams can not create a teamimage.png

Wait 5 minutes to complete the set, use UCSSI-OneDrive this account to log Teams group members join or create a team click a button to join the team not only the result of the option to create a team, the configuration is already in force.image.png

Guess you like

Origin blog.51cto.com/scnbwy/2435657