diff --git a/CHANGELOG.md b/CHANGELOG.md index 21ec4fcb3..41a53c563 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Added `-IncludeSensitivityLabels` parameter to `Get-PnPMicrosoft365Group` cmdlet to retrieve sensitivity labels assigned to M365 Groups. [#3991](https://github.com/pnp/powershell/pull/3991) - Added `Get-PnPFileSensitivityLabelInfo` cmdlet to retrieve sensitivity label information about a file in a SharePoint site. [#3994](https://github.com/pnp/powershell/pull/3994) - Added `Get-PnPTenantRestrictedSearchAllowedList` cmdlet to retrieve existing list of URLs in the allowed list. [#3997](https://github.com/pnp/powershell/pull/3997) +- Added `-IsSharePointAddInsDisabled` to the `Set-PnPTenant` cmdlet which allows disabling SharePoint Add-ins ### Fixed diff --git a/documentation/Set-PnPTenant.md b/documentation/Set-PnPTenant.md index 867623c10..ee2cd4552 100644 --- a/documentation/Set-PnPTenant.md +++ b/documentation/Set-PnPTenant.md @@ -154,6 +154,7 @@ Set-PnPTenant [-SpecialCharactersStateInFileFolderNames [-OneDriveDefaultLinkToExistingAccess ] [-OneDriveBlockGuestsAsSiteAdmin ] [-RecycleBinRetentionPeriod ] + [-IsSharePointAddInsDisabled ] [-Force] [-Connection ] ``` @@ -704,6 +705,24 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -IsSharePointAddInsDisabled +When the feature is enabled, all the add-ins features will be disabled. + +The valid values are: +- False (default) - All the add-ins features are supported. +- True - All the add-ins features will be disabled. + +```yaml +Type: Boolean +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -LegacyAuthProtocolsEnabled By default this value is set to $true. diff --git a/src/Commands/Admin/SetTenant.cs b/src/Commands/Admin/SetTenant.cs index 48283182d..fd24f7e76 100644 --- a/src/Commands/Admin/SetTenant.cs +++ b/src/Commands/Admin/SetTenant.cs @@ -469,6 +469,9 @@ public class SetTenant : PnPAdminCmdlet [Parameter(Mandatory = false)] public int? RecycleBinRetentionPeriod { get; set; } + [Parameter(Mandatory = false)] + public bool? IsSharePointAddInsDisabled { get; set; } + protected override void ExecuteCmdlet() { AdminContext.Load(Tenant); @@ -1508,6 +1511,11 @@ protected override void ExecuteCmdlet() Tenant.RecycleBinRetentionPeriod = RecycleBinRetentionPeriod.Value; modified = true; } + if (IsSharePointAddInsDisabled.HasValue) + { + Tenant.SharePointAddInsDisabled = IsSharePointAddInsDisabled.Value; + modified = true; + } if (BlockDownloadFileTypePolicy.HasValue) { if (!BlockDownloadFileTypePolicy.Value)