Skip to content

Commit

Permalink
Added -BlockSendLabelMismatchEmail to Set-PnPTenant (#3113)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
KoenZomers and gautamdsheth authored May 17, 2023
1 parent f36907e commit 605efd2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
17 changes: 16 additions & 1 deletion documentation/Set-PnPTenant.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions src/Commands/Admin/SetTenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -1218,6 +1221,12 @@ protected override void ExecuteCmdlet()
modified = true;
}

if (BlockSendLabelMismatchEmail.HasValue)
{
Tenant.BlockSendLabelMismatchEmail = BlockSendLabelMismatchEmail.Value;
modified = true;
}

if (modified)
{
AdminContext.ExecuteQueryRetry();
Expand Down

0 comments on commit 605efd2

Please sign in to comment.