Skip to content

Commit 605efd2

Browse files
Added -BlockSendLabelMismatchEmail to Set-PnPTenant (#3113)
* 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 * 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 --------- Co-authored-by: Gautam Sheth <gautamdsheth@outlook.com>
1 parent f36907e commit 605efd2

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
1919
- Added `Get-PnPLargeListOperationStatus` cmdlet to retrieve the status of a large list operation. [#3033](https://github.com/pnp/powershell/pull/3033)
2020
- Added `-BlockDownloadPolicy`, `-ExcludeBlockDownloadPolicySiteOwners` and `ExcludedBlockDownloadGroupIds` parameters to `Set-PnPTenantSite` and `Set-PnPSite` cmdlets. [#3084](https://github.com/pnp/powershell/pull/3084)
2121
- 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)
22+
- 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
2223

2324
### Fixed
2425

documentation/Set-PnPTenant.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,21 @@ Accept pipeline input: False
253253
Accept wildcard characters: False
254254
```
255255
256+
### -BlockSendLabelMismatchEmail
257+
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](
258+
https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels-teams-groups-sites?view=o365-worldwide#auditing-sensitivity-label-activities).
259+
260+
```yaml
261+
Type: Boolean
262+
Parameter Sets: (All)
263+
264+
Required: False
265+
Position: Named
266+
Default value: None
267+
Accept pipeline input: False
268+
Accept wildcard characters: False
269+
```
270+
256271
### -CommentsOnSitePagesDisabled
257272
Disables or enables the commenting functionality on all site pages in the tenant.
258273
@@ -1575,7 +1590,7 @@ Accept wildcard characters: False
15751590

15761591
### -LabelMismatchEmailHelpLink
15771592

1578-
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.
1593+
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).
15791594

15801595
```yaml
15811596
Type: String

src/Commands/Admin/SetTenant.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,9 @@ public class SetTenant : PnPAdminCmdlet
355355
[Parameter(Mandatory = false)]
356356
public string ArchiveRedirectUrl { get; set; }
357357

358+
[Parameter(Mandatory = false)]
359+
public bool? BlockSendLabelMismatchEmail { get; set; }
360+
358361
protected override void ExecuteCmdlet()
359362
{
360363
AdminContext.Load(Tenant);
@@ -1218,6 +1221,12 @@ protected override void ExecuteCmdlet()
12181221
modified = true;
12191222
}
12201223

1224+
if (BlockSendLabelMismatchEmail.HasValue)
1225+
{
1226+
Tenant.BlockSendLabelMismatchEmail = BlockSendLabelMismatchEmail.Value;
1227+
modified = true;
1228+
}
1229+
12211230
if (modified)
12221231
{
12231232
AdminContext.ExecuteQueryRetry();

0 commit comments

Comments
 (0)