From 28ed2f14cde4c03ba25f0dc516fb3c708429a0b8 Mon Sep 17 00:00:00 2001 From: Gautam Sheth Date: Thu, 21 Nov 2024 21:20:19 +0200 Subject: [PATCH] Fix Add-PnPFileSensitivityLabel cmdlet to allow empty string value for resetting file sensitivity label (#4566) Co-authored-by: Gautam Sheth --- CHANGELOG.md | 1 + src/Commands/Files/AddFileSensitivityLabel.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c676c5ac..92a8a039b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Fixed the PnP PowerShell version check to only check nightly version in nightly builds and major version in release builds. [#4453](https://github.com/pnp/powershell/pull/4453) - Fixed `-ConsistencyLevelEventual` flag on `Invoke-PnPGraphMethod` to work correctly. [#4523](https://github.com/pnp/powershell/pull/4523) - Fixed `Get-PnPServiceHealthIssue` returning an error when certain service states were active [#4530](https://github.com/pnp/powershell/pull/4530) +- Fixed `Add-PnPFileSensitivityLabel` cmdlet to allow empty string value to reset file sensitivity label. ### Removed diff --git a/src/Commands/Files/AddFileSensitivityLabel.cs b/src/Commands/Files/AddFileSensitivityLabel.cs index af54b859a..956daa723 100644 --- a/src/Commands/Files/AddFileSensitivityLabel.cs +++ b/src/Commands/Files/AddFileSensitivityLabel.cs @@ -18,6 +18,8 @@ public class AddFileSensitivityLabel : PnPGraphCmdlet public FilePipeBind Identity; [Parameter(Mandatory = true)] + [AllowNull] + [AllowEmptyString] public string SensitivityLabelId; [Parameter(Mandatory = false)]