diff --git a/CHANGELOG.md b/CHANGELOG.md index d6d770840..5532449eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Added `Get-PnPLargeListOperationStatus` cmdlet to retrieve the status of a large list operation. [#3033](https://github.com/pnp/powershell/pull/3033) - Added `-BlockDownloadPolicy`, `-ExcludeBlockDownloadPolicySiteOwners` and `ExcludedBlockDownloadGroupIds` parameters to `Set-PnPTenantSite` and `Set-PnPSite` cmdlets. [#3084](https://github.com/pnp/powershell/pull/3084) - Added `-ArchiveRedirectUrl` to `Set-PnPTenant` allowing the configuration of a custom page to be shown when navigating to an archived SharePoint Online site [#3100](https://github.com/pnp/powershell/pull/3100) +- Added `-BlockSendLabelMismatchEmail` to `Set-PnPTenant` allowing the warning e-mail being sent when uploading a file with a higher sensitivity label than the site it is being uploaded to to be disabled ### Fixed diff --git a/documentation/Set-PnPTenant.md b/documentation/Set-PnPTenant.md index 476439fe7..88648d0c2 100644 --- a/documentation/Set-PnPTenant.md +++ b/documentation/Set-PnPTenant.md @@ -253,6 +253,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -BlockSendLabelMismatchEmail +Allows blocking of the automated e-mail being sent when somebody uploads a document to a site that's protected with a sensitivity label and their document has a higher priority sensitivity label than the sensitivity label applied to the site. [More information]( +https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels-teams-groups-sites?view=o365-worldwide#auditing-sensitivity-label-activities). + +```yaml +Type: Boolean +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -CommentsOnSitePagesDisabled Disables or enables the commenting functionality on all site pages in the tenant. @@ -1575,7 +1590,7 @@ Accept wildcard characters: False ### -LabelMismatchEmailHelpLink -This parameter allows tenant admins to customize the "Help Link" in email with the subject "Incompatible sensitivity label detected." When a sensitivity label mismatch occurs between the label on the document uploaded and the label on the site, SharePoint Online captures an audit record and sends an Incompatible sensitivity label detected email notification to the person who uploaded the document and the site owner. The notification contains details of the document which caused the problem and the label assigned to the document and to the site. The comparison happens between the priority of these two labels. +This parameter allows tenant admins to customize the "Help Link" in email with the subject "Incompatible sensitivity label detected." When a sensitivity label mismatch occurs between the label on the document uploaded and the label on the site, SharePoint Online captures an audit record and sends an Incompatible sensitivity label detected email notification to the person who uploaded the document and the site owner. The notification contains details of the document which caused the problem and the label assigned to the document and to the site. The comparison happens between the priority of these two labels. [More information](https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels-teams-groups-sites?view=o365-worldwide#auditing-sensitivity-label-activities). ```yaml Type: String diff --git a/src/Commands/Admin/SetTenant.cs b/src/Commands/Admin/SetTenant.cs index ad6b65b48..b32615901 100644 --- a/src/Commands/Admin/SetTenant.cs +++ b/src/Commands/Admin/SetTenant.cs @@ -355,6 +355,9 @@ public class SetTenant : PnPAdminCmdlet [Parameter(Mandatory = false)] public string ArchiveRedirectUrl { get; set; } + [Parameter(Mandatory = false)] + public bool? BlockSendLabelMismatchEmail { get; set; } + protected override void ExecuteCmdlet() { AdminContext.Load(Tenant); @@ -1218,6 +1221,12 @@ protected override void ExecuteCmdlet() modified = true; } + if (BlockSendLabelMismatchEmail.HasValue) + { + Tenant.BlockSendLabelMismatchEmail = BlockSendLabelMismatchEmail.Value; + modified = true; + } + if (modified) { AdminContext.ExecuteQueryRetry();