From 4c56e98b06c4dad35ae42dbeea50d785eed12b87 Mon Sep 17 00:00:00 2001 From: wilecoyotegenius Date: Fri, 17 Nov 2023 20:20:07 +0100 Subject: [PATCH 1/3] Implementation --- src/Commands/Admin/SetTenant.cs | 9 +++++++++ src/Commands/Model/SPOTenant.cs | 11 +++++++++++ 2 files changed, 20 insertions(+) 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; + } } } } From f86db5eaad32793420166d4f7857d70f51aa0717 Mon Sep 17 00:00:00 2001 From: wilecoyotegenius Date: Sun, 19 Nov 2023 21:32:03 +0100 Subject: [PATCH 2/3] Update documentation --- documentation/Set-PnPTenant.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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. From 35208f4d9727a9e794f04f3fe5fec94d2a28091f Mon Sep 17 00:00:00 2001 From: Koen Zomers Date: Sun, 19 Nov 2023 21:56:58 +0100 Subject: [PATCH 3/3] Added changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) 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]