Skip to content

Commit

Permalink
Added -IsSharePointAddInsDisabled to Set-PnPTenant
Browse files Browse the repository at this point in the history
  • Loading branch information
KoenZomers committed Jun 18, 2024
1 parent 95259a7 commit f3bf9b3
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
19 changes: 19 additions & 0 deletions documentation/Set-PnPTenant.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ Set-PnPTenant [-SpecialCharactersStateInFileFolderNames <SpecialCharactersState>
[-OneDriveDefaultLinkToExistingAccess <Boolean>]
[-OneDriveBlockGuestsAsSiteAdmin <SharingState>]
[-RecycleBinRetentionPeriod <Int32>]
[-IsSharePointAddInsDisabled <Boolean>]
[-Force] [-Connection <PnPConnection>]
```

Expand Down Expand Up @@ -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.

Expand Down
8 changes: 8 additions & 0 deletions src/Commands/Admin/SetTenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f3bf9b3

Please sign in to comment.