Skip to content

Commit

Permalink
Changes to update and retrieve property SiteOwnerManageLegacyServiceP…
Browse files Browse the repository at this point in the history
…rincipalEnabled
  • Loading branch information
reshmee011 committed Aug 1, 2023
1 parent 86a45e3 commit e597722
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/Commands/Admin/SetTenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,8 @@ public class SetTenant : PnPAdminCmdlet
[Parameter(Mandatory = false)]
public MediaTranscriptionAutomaticFeaturesPolicyType? MediaTranscriptionAutomaticFeatures { get; set; }

[Parameter(Mandatory = false)]
public bool? SiteOwnerManageLegacyServicePrincipalEnabled { get; set; }
protected override void ExecuteCmdlet()
{
AdminContext.Load(Tenant);
Expand Down Expand Up @@ -1266,6 +1268,12 @@ protected override void ExecuteCmdlet()
modified = true;
}

if (SiteOwnerManageLegacyServicePrincipalEnabled.HasValue)
{
Tenant.SiteOwnerManageLegacyServicePrincipalEnabled = SiteOwnerManageLegacyServicePrincipalEnabled.Value;
modified = true;
}

if (BlockDownloadFileTypePolicy.HasValue)
{
if (!BlockDownloadFileTypePolicy.Value)
Expand Down
14 changes: 13 additions & 1 deletion src/Commands/Model/SPOTenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public SPOTenant(Tenant tenant, ClientContext clientContext)
this.displayNamesOfFileViewersInSpo = tenant.DisplayNamesOfFileViewersInSpo;
this.isLoopEnabled = tenant.IsLoopEnabled;
this.enableAzureADB2BIntegration = tenant.EnableAzureADB2BIntegration;
this.siteOwnerManageLegacyServicePrincipalEnabled = tenant.SiteOwnerManageLegacyServicePrincipalEnabled;

try
{
Expand Down Expand Up @@ -461,7 +462,15 @@ public SPOTenant(Tenant tenant, ClientContext clientContext)
}
catch
{
}
}

try
{
this.siteOwnerManageLegacyServicePrincipalEnabled = tenant.SiteOwnerManageLegacyServicePrincipalEnabled;
}
catch
{
}
}

public bool HideDefaultThemes => hideDefaultThemes;
Expand Down Expand Up @@ -630,6 +639,7 @@ public SPOTenant(Tenant tenant, ClientContext clientContext)
public int? MajorVersionLimit => majorVersionLimit;
public bool? EnableAutoExpirationVersionTrim => enableAutoExpirationVersionTrim;
public bool? EnableAzureADB2BIntegration => enableAzureADB2BIntegration;
public bool? SiteOwnerManageLegacyServicePrincipalEnabled => siteOwnerManageLegacyServicePrincipalEnabled;

private bool hideDefaultThemes;

Expand Down Expand Up @@ -808,5 +818,7 @@ public SPOTenant(Tenant tenant, ClientContext clientContext)
private bool? enableAutoExpirationVersionTrim;

private bool? enableAzureADB2BIntegration;

private bool? siteOwnerManageLegacyServicePrincipalEnabled;
}
}

0 comments on commit e597722

Please sign in to comment.