diff --git a/CHANGELOG.md b/CHANGELOG.md index ad4096896..6f56bb6cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Added `-BusinessConnectivityServiceDisabled` parameter to `Set-PnPTenant` cmdlt to allow disabling the Business Connectivity Service [#3562](https://github.com/pnp/powershell/pull/3562) - Added support for executing the 'Invoke-PnPSPRestMethod' cmdlet in a batch [#3565](https://github.com/pnp/powershell/pull/3565) - Added `Get-PnPSiteSetVersionPolicyProgress` cmdlet which allows for getting the progress of setting a version policy for existing document libraries on a site [#3564](https://github.com/pnp/powershell/pull/3564) +- Added `EnableSensitivityLabelForPDF` to `Set-PnPTenant` and `Get-PnPTenant` [#3581](https://github.com/pnp/powershell/pull/3581) ### Fixed @@ -96,6 +97,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Contributors +- Konrad K. [wilecoyotegenius] - Dan Cecil [danielcecil] - Antti K. Koskela [koskila] - Christian Veenhuis [ChVeen] diff --git a/documentation/Set-PnPTenant.md b/documentation/Set-PnPTenant.md index 8d7fda0b3..a544bd6ae 100644 --- a/documentation/Set-PnPTenant.md +++ b/documentation/Set-PnPTenant.md @@ -135,6 +135,7 @@ Set-PnPTenant [-SpecialCharactersStateInFileFolderNames [-IncludeAtAGlanceInShareEmails ] [-MassDeleteNotificationDisabled ] [-BusinessConnectivityServiceDisabled ] + [-EnableSensitivityLabelForPDF ] [-Force] [-Connection ] ``` @@ -297,6 +298,29 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -EnableSensitivityLabelForPDF +Allows turning on support for PDFs with sensitivity labels for the following scenarios: + +- Applying a sensitivity label in Office for the web. +- Uploading a labeled document, and then extracting and displaying that sensitivity label. +- Search, eDiscovery, and data loss prevention. +- Auto-labeling policies and default sensitivity labels for SharePoint document libraries. + +The valid values are: +True - Enables support for PDFs. +False (default) - Disables support for PDFs. + +```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. diff --git a/src/Commands/Admin/SetTenant.cs b/src/Commands/Admin/SetTenant.cs index eb9f9ade9..aa909b6b9 100644 --- a/src/Commands/Admin/SetTenant.cs +++ b/src/Commands/Admin/SetTenant.cs @@ -404,6 +404,9 @@ public class SetTenant : PnPAdminCmdlet [Parameter(Mandatory = false)] public bool? BusinessConnectivityServiceDisabled { get; set; } + [Parameter(Mandatory = false)] + public bool? EnableSensitivityLabelForPDF { get; set; } + protected override void ExecuteCmdlet() { AdminContext.Load(Tenant); @@ -1344,6 +1347,12 @@ protected override void ExecuteCmdlet() modified = true; } + if (EnableSensitivityLabelForPDF.HasValue) + { + Tenant.EnableSensitivityLabelForPDF = EnableSensitivityLabelForPDF.Value; + modified = true; + } + if (BlockDownloadFileTypePolicy.HasValue) { if (!BlockDownloadFileTypePolicy.Value) diff --git a/src/Commands/Model/SPOTenant.cs b/src/Commands/Model/SPOTenant.cs index 7492005db..10a506bd7 100644 --- a/src/Commands/Model/SPOTenant.cs +++ b/src/Commands/Model/SPOTenant.cs @@ -181,6 +181,8 @@ public class SPOTenant public bool? BusinessConnectivityServiceDisabled { private set; get; } + public bool? EnableSensitivityLabelForPDF { private set; get; } + #endregion public SPOTenant(Tenant tenant, ClientContext clientContext) @@ -642,6 +644,15 @@ public SPOTenant(Tenant tenant, ClientContext clientContext) OneDriveRequestFilesLinkEnabled = tenant.OneDriveRequestFilesLinkEnabled; OneDriveRequestFilesLinkExpirationInDays = tenant.OneDriveRequestFilesLinkExpirationInDays; BusinessConnectivityServiceDisabled = tenant.BusinessConnectivityServiceDisabled; + + try + { + EnableSensitivityLabelForPDF = tenant.EnableSensitivityLabelForPDF; + } + catch + { + EnableSensitivityLabelForPDF = false; + } } } }