diff --git a/documentation/Set-PnPTenant.md b/documentation/Set-PnPTenant.md index bcb597324..1642c6f02 100644 --- a/documentation/Set-PnPTenant.md +++ b/documentation/Set-PnPTenant.md @@ -162,6 +162,18 @@ Set-PnPTenant [-SpecialCharactersStateInFileFolderNames [-SelfServiceSiteCreationDisabled ] [-SyncAadB2BManagementPolicy] [-ExtendPermissionsToUnprotectedFiles ] + [-WhoCanShareAllowListInTenant ] + [-LegacyBrowserAuthProtocolsEnabled ] + [-EnableDiscoverableByOrganizationForVideos ] + [-RestrictedAccessControlforSitesErrorHelpLink ] + [-Workflow2010Disabled ] + [-AllowSharingOutsideRestrictedAccessControlGroups ] + [-HideSyncButtonOnDocLib ] + [-HideSyncButtonOnODB ] + [-StreamLaunchConfig ] + [-EnableMediaReactions ] + [-ContentSecurityPolicyEnforcement ] + [-DisableSpacesActivation ] [-Force] [-Connection ] ``` @@ -2841,6 +2853,175 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -WhoCanShareAllowListInTenant +Sets a value to handle the tenant who can share settings + +```yaml +Type: String +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + + +### -LegacyBrowserAuthProtocolsEnabled +Enables or disables legacy browser authentication protocols. + +```yaml +Type: Boolean +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableDiscoverableByOrganizationForVideos +Enables or disables the sharing dialog to include a checkbox offering the user the ability to share to a security group containing every user in the organization. + +```yaml +Type: Boolean +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RestrictedAccessControlforSitesErrorHelpLink +Sets a custom learn more link to inform users who were denied access to a SharePoint site due to the restricted site access control policy. + +```yaml +Type: String +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Workflow2010Disabled +Sets a value to specify whether Workflow 2010 is disabled. + +```yaml +Type: Boolean +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AllowSharingOutsideRestrictedAccessControlGroups +Controls whether sharing SharePoint sites and their content is allowed with users and groups who are not allowed as per the Restricted access control policy. + +```yaml +Type: Boolean +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HideSyncButtonOnDocLib +Sets a value to specify whether the sync button on document libraries is hidden. + +```yaml +Type: Boolean +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HideSyncButtonOnODB +Set whether to hide the sync button on OneDrive for Business sites. + +```yaml +Type: Boolean +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StreamLaunchConfig +Sets the default destination for the Stream app launcher tile. + +```yaml +Type: Int32 +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableMediaReactions +Controls whether media reactions are enabled. + +```yaml +Type: Boolean +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ContentSecurityPolicyEnforcement +Controls whether content security policy is enabled. + +```yaml +Type: Boolean +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisableSpacesActivation +Enables or disables activation of spaces. + +```yaml +Type: Boolean +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Force If provided, no confirmation will be requested and the action will be performed diff --git a/src/Commands/Admin/SetTenant.cs b/src/Commands/Admin/SetTenant.cs index 35c9f680a..d3da9cf90 100644 --- a/src/Commands/Admin/SetTenant.cs +++ b/src/Commands/Admin/SetTenant.cs @@ -486,7 +486,42 @@ public class SetTenant : PnPAdminCmdlet [Parameter(Mandatory = false)] public bool? ExtendPermissionsToUnprotectedFiles { private set; get; } + [Parameter(Mandatory = false)] + public string WhoCanShareAllowListInTenant { private set; get; } + + [Parameter(Mandatory = false)] + public bool? LegacyBrowserAuthProtocolsEnabled { private set; get; } + + [Parameter(Mandatory = false)] + public bool? EnableDiscoverableByOrganizationForVideos { private set; get; } + + [Parameter(Mandatory = false)] + public string RestrictedAccessControlforSitesErrorHelpLink { private set; get; } + + [Parameter(Mandatory = false)] + public bool? Workflow2010Disabled { private set; get; } + + [Parameter(Mandatory = false)] + public bool? AllowSharingOutsideRestrictedAccessControlGroups { private set; get; } + [Parameter(Mandatory = false)] + public bool? HideSyncButtonOnDocLib { private set; get; } + + [Parameter(Mandatory = false)] + public bool? HideSyncButtonOnODB { private set; get; } + + [Parameter(Mandatory = false)] + public int? StreamLaunchConfig { private set; get; } + + [Parameter(Mandatory = false)] + public bool? EnableMediaReactions { private set; get; } + + [Parameter(Mandatory = false)] + public bool? ContentSecurityPolicyEnforcement { private set; get; } + + [Parameter(Mandatory = false)] + public bool? DisableSpacesActivation { private set; get; } + protected override void ExecuteCmdlet() { AdminContext.Load(Tenant); @@ -1557,6 +1592,66 @@ protected override void ExecuteCmdlet() Tenant.ExtendPermissionsToUnprotectedFiles = ExtendPermissionsToUnprotectedFiles.Value; modified = true; } + if (WhoCanShareAllowListInTenant != null) + { + Tenant.WhoCanShareAllowListInTenant = WhoCanShareAllowListInTenant; + modified = true; + } + if (LegacyBrowserAuthProtocolsEnabled.HasValue) + { + Tenant.LegacyBrowserAuthProtocolsEnabled = LegacyBrowserAuthProtocolsEnabled.Value; + modified = true; + } + if (EnableDiscoverableByOrganizationForVideos.HasValue) + { + Tenant.EnableDiscoverableByOrganizationForVideos = EnableDiscoverableByOrganizationForVideos.Value; + modified = true; + } + if (RestrictedAccessControlforSitesErrorHelpLink != null) + { + Tenant.RestrictedAccessControlforSitesErrorHelpLink = RestrictedAccessControlforSitesErrorHelpLink; + modified = true; + } + if (Workflow2010Disabled.HasValue) + { + Tenant.Workflow2010Disabled = Workflow2010Disabled.Value; + modified = true; + } + if (AllowSharingOutsideRestrictedAccessControlGroups.HasValue) + { + Tenant.AllowSharingOutsideRestrictedAccessControlGroups = AllowSharingOutsideRestrictedAccessControlGroups.Value; + modified = true; + } + if (HideSyncButtonOnDocLib.HasValue) + { + Tenant.HideSyncButtonOnDocLib = HideSyncButtonOnDocLib.Value; + modified = true; + } + if (HideSyncButtonOnODB.HasValue) + { + Tenant.HideSyncButtonOnODB = HideSyncButtonOnODB.Value; + modified = true; + } + if (StreamLaunchConfig.HasValue) + { + Tenant.StreamLaunchConfig = StreamLaunchConfig.Value; + modified = true; + } + if (EnableMediaReactions.HasValue) + { + Tenant.EnableMediaReactions = EnableMediaReactions.Value; + modified = true; + } + if (ContentSecurityPolicyEnforcement.HasValue) + { + Tenant.ContentSecurityPolicyEnforcement = ContentSecurityPolicyEnforcement.Value; + modified = true; + } + if (DisableSpacesActivation.HasValue) + { + Tenant.DisableSpacesActivation = DisableSpacesActivation.Value; + modified = true; + } if (GuestSharingGroupAllowListInTenantByPrincipalIdentity != null) { if (GuestSharingGroupAllowListInTenantByPrincipalIdentity.Length > 0) diff --git a/src/Commands/Model/SPOTenant.cs b/src/Commands/Model/SPOTenant.cs index 70fbe7e97..6c61a5704 100644 --- a/src/Commands/Model/SPOTenant.cs +++ b/src/Commands/Model/SPOTenant.cs @@ -1,6 +1,7 @@ using Microsoft.Online.SharePoint.TenantAdministration; using Microsoft.Online.SharePoint.TenantManagement; using Microsoft.SharePoint.Client; +using Microsoft.SharePoint.Client.Administration; using Microsoft.SharePoint.Client.Sharing; using System; using System.Collections.Generic; @@ -249,7 +250,23 @@ public class SPOTenant public string[] GuestSharingGroupAllowListInTenantByPrincipalIdentity { private set; get; } public bool? AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled { private set; get; } public bool? SelfServiceSiteCreationDisabled { private set; get; } - + public string WhoCanShareAllowListInTenant { private set; get; } + public bool ExtendPermissionsToUnprotectedFiles { private set; get; } + public bool LegacyBrowserAuthProtocolsEnabled { private set; get; } + public bool EnableDiscoverableByOrganizationForVideos { private set; get; } + public string RestrictedAccessControlforSitesErrorHelpLink { private set; get; } + public bool Workflow2010Disabled { private set; get; } + public bool AllowSharingOutsideRestrictedAccessControlGroups { private set; get; } + public Workflows2013State Workflows2013State { private set; get; } + public bool DisableVivaConnectionsAnalytics { private set; get; } + public bool HideSyncButtonOnDocLib { private set; get; } + public bool HideSyncButtonOnODB { private set; get; } + public int StreamLaunchConfig { private set; get; } + public bool EnableRestrictedAccessControl { private set; get; } + public SPBlockDownloadFileTypeId[] BlockDownloadFileTypeIds { private set; get; } + public Guid[] ExcludedBlockDownloadGroupIds { private set; get; } + public bool EnableMediaReactions { private set; get; } + public bool ContentSecurityPolicyEnforcement { private set; get; } #endregion public SPOTenant(Tenant tenant, ClientContext clientContext) @@ -772,6 +789,23 @@ public SPOTenant(Tenant tenant, ClientContext clientContext) try { GuestSharingGroupAllowListInTenantByPrincipalIdentity = tenant.GuestSharingGroupAllowListInTenantByPrincipalIdentity?.ToArray(); } catch { } try { AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled = tenant.AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled; } catch { } try { SelfServiceSiteCreationDisabled = tenant.SelfServiceSiteCreationDisabled; } catch { } + try { WhoCanShareAllowListInTenant = tenant.WhoCanShareAllowListInTenant; } catch { } + try { ExtendPermissionsToUnprotectedFiles = tenant.ExtendPermissionsToUnprotectedFiles; } catch { } + try { LegacyBrowserAuthProtocolsEnabled = tenant.LegacyBrowserAuthProtocolsEnabled; } catch { } + try { EnableDiscoverableByOrganizationForVideos = tenant.EnableDiscoverableByOrganizationForVideos; } catch { } + try { RestrictedAccessControlforSitesErrorHelpLink = tenant.RestrictedAccessControlforSitesErrorHelpLink; } catch { } + try { Workflow2010Disabled = tenant.Workflow2010Disabled; } catch { } + try { Workflows2013State = tenant.Workflows2013State; } catch { } + try { AllowSharingOutsideRestrictedAccessControlGroups = tenant.AllowSharingOutsideRestrictedAccessControlGroups; } catch { } + try { DisableVivaConnectionsAnalytics = tenant.DisableVivaConnectionsAnalytics; } catch { } + try { HideSyncButtonOnDocLib = tenant.HideSyncButtonOnDocLib; } catch { } + try { HideSyncButtonOnODB = tenant.HideSyncButtonOnODB; } catch { } + try { StreamLaunchConfig = tenant.StreamLaunchConfig; } catch { } + try { EnableRestrictedAccessControl = tenant.EnableRestrictedAccessControl; } catch { } + try { BlockDownloadFileTypeIds = tenant.BlockDownloadFileTypeIds; } catch { } + try { ExcludedBlockDownloadGroupIds = tenant.ExcludedBlockDownloadGroupIds; } catch { } + try { EnableMediaReactions = tenant.EnableMediaReactions; } catch { } + try { ContentSecurityPolicyEnforcement = tenant.ContentSecurityPolicyEnforcement; } catch { } } } }