22 C
Dubai
Monday, December 23, 2024

Enable Sensitive Labels for Groups & Sites

This article contains instructions for using PowerShell cmdlets to create and update groups in Azure Active Directory (Azure AD), part of Microsoft Entra. This content applies only to Microsoft 365 groups 

Install PowerShell cmdlets

Be sure to uninstall any older version of the Azure Active Directory PowerShell for Graph Module for Windows PowerShell and install.

  1. Open the Windows PowerShell app as an administrator.
  2. Uninstall any previous version of AzureADPreview
Uninstall-Module AzureADPreview
  1. Install the latest version of AzureADPreview.
Install-Module -Name AzureADPreview
  1. Connect to AzureAD
Connect-AzureAD
Connect-AzureAD

Create settings at the directory level.

These steps create settings at the directory level, which apply to all Microsoft 365 groups in the directory. The Get-AzureADDirectorySettingTemplate cmdlet is available only in the Azure AD Powershell.

  1. In the DirectorySettings cmdlets, you must specify the ID of the SettingsTemplate you want to use. If you do not know this ID, this cmdlet returns the list of all settings templates.
Get-AzureADDirectorySettingTemplate

This cmdlet call returns all available templates:

  1. To add a usage guideline URL, first, you need to get the SettingsTemplate object that defines the usage guideline URL value: the Group. Unified template:
$TemplateId = (Get-AzureADDirectorySettingTemplate | where { $_.DisplayName -eq "Group.Unified" }).Id
$Template = Get-AzureADDirectorySettingTemplate | where -Property Id -Value $TemplateId -EQ
  1. Next, create a new settings object based on that template:
$Setting = $Template.CreateDirectorySetting()
  1. Then update the settings object with a new value. The two examples below change the usage guideline value and enable sensitivity labels. Set these or any other setting in the template as required:
$Setting["UsageGuidelinesUrl"] = "https://guideline.example.com"
$Setting["EnableMIPLabels"] = "True"
  1. Then apply the setting:
New-AzureADDirectorySetting -DirectorySetting $Setting
  1. You can read the values using:
$Setting.Values
Dinesh D P
Dinesh D P
As a seasoned Senior DevOps Engineer at Virtual Petals, I bring a wealth of expertise in Microsoft Cloud, DevOps, and the Microsoft 365 Stack. With a track record of delivering successful projects across the globe.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

× How can I help you?