In our interconnected digital world, data moves effortlessly across platforms, applications, and collaborative spaces. Meet the container labels, the guardians responsible for protecting data sensitivity and access controls in Microsoft 365. These labels allow you to create rules and policies for different content types across SharePoint sites, Microsoft Teams, and Unified Groups. Get ready as we dive into the detailed process of creating and managing these labels, using both the user-friendly interface (UI) and powerful PowerShell commands.
Let’s compare the capabilities of the UI and PowerShell when configuring container labels. While the UI provides a user-friendly experience, PowerShell offers additional settings and flexibility.
Set-Label -Identity <LabelGUID> -AdvancedSettings @{MembersCanShare="MemberShareNone"}
Set-Label -Identity <LabelGUID> -AdvancedSettings @{DefaultSharingScope="SpecificPeople"}
Set-Label -Identity <LabelGUID> -AdvancedSettings @{DefaultShareLinkPermission="Edit"}
Set-Label -Identity <LabelGUID> -AdvancedSettings @{DefaultShareLinkToExistingAccess="True"}
New-Label -Name General `-DisplayName General `-Tooltip "Public or private team | Guests allowed | File and folder sharing allowed | Members can share content, site owners share the site" `-ContentType "Site, UnifiedGroup" `-AdvancedSettings @{MembersCanShare = "MemberShareFileAndFolder"}
New-Label -Name Sensitive `-DisplayName Sensitive `-Tooltip "Private team | Guests allowed | File and folder sharing allowed | Members can share content, site owners share the site" `-ContentType "Site, UnifiedGroup" `-AdvancedSettings @{MembersCanShare = "MemberShareFileAndFolder"DefaultSharingScope = "SpecificPeople"} `-SiteAndGroupProtectionEnabled $true `-SiteAndGroupProtectionPrivacy "Private" `-SiteAndGroupProtectionAllowAccessToGuestUsers $true
New-Label -Name "Highly Sensitive" `-DisplayName "Highly Sensitive" `-Tooltip "Private team | Guests not allowed | Internal sharing only | Only site owners can share content and the site" `-ContentType "Site, UnifiedGroup" `-AdvancedSettings @{MembersCanShare = "MemberShareNone"DefaultSharingScope = "SpecificPeople"} `-SiteAndGroupProtectionEnabled $true `-SiteAndGroupProtectionPrivacy "Private" `-SiteAndGroupProtectionAllowAccessToGuestUsers $false `-SiteExternalSharingControlType "Disabled"
In this journey through the intricacies of container labels, we’ve explored options for both the user-friendly UI and the powerful realm of PowerShell. Armed with this knowledge, you can now confidently sculpt rules and policies for your content—whether it resides in SharePoint sites, Microsoft Teams, or Unified Groups.
Remember, the UI provides simplicity and ease of use, while PowerShell offers additional settings and flexibility.
Thank you for reading
/Simon