Create Classifications for MS Teams in Azure

Microsoft Teams templates

Microsoft offers us the possibility to use classification labels that can be attached to a team. With these practical labels, teams can be marked clearly visible in the upper right corner to the user, for example to show the security rating of the team.

In order to use classifications in Teams, however, they must first be created in Microsoft Azure via PowerShell. The names and descriptions of the classifications can be adapted to your needs. Simply exchange them in the following script:

Install-Module AzureADPreview
Connect-AzureAD
Get-AzureADDirectorySettingTemplate
$Template = Get-AzureADDirectorySettingTemplate | ? {$_.Displayname -eq "Group.Unified"}
$TemplateSettings = $Template.CreateDirectorySetting()
$TemplateSettings["ClassificationList"] = "Confidential,Restricted,Internal Use,Public"
$TemplateSettings["ClassificationDescriptions"] = "Confidential:High business impact. Normally accessible only to specified members,Restricted:Normally accessible only to specified and/or relevant members,Internal Use:Normally accessible to all employees,Public:Accessible to all members of the public"
$TemplateSettings["DefaultClassification"] = "Internal Use"
New-AzureADDirectorySetting -DirectorySetting $TemplateSettings

After successful execution of the script the classifications are created and available.

If the script fails, it is presumably because there already exists a script.

In this case, first execute the following script and then create the classifications according to the script above.

$Setting = Get-AzureADDirectorySetting | ? { $_.DisplayName -eq "Group.Unified"}
$Setting["ClassificationList"] = "Confidential,Restricted,Internal Use,Public"
$Setting["ClassificationDescriptions"] = "Confidential:High business impact. Normally accessible only to specified members,Restricted:Normally accessible only to specified and/or relevant members,Internal Use:Normally accessible to all employees,Public:Accessible to all members of the public"
$Setting["DefaultClassification"] = "Internal Use"
Set-AzureADDirectorySetting -Id $Setting.Id -DirectorySetting $Setting

After the successful creation, the classifications can now be used when creating teams and are also available in the Teams Manager to automatically assign the correct labels to new teams.

Leave a Reply

Your email address will not be published. Required fields are marked *