Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 3353 #3357

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/Commands/Admin/GetExternalUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ public class GetExternalUser : PnPAdminCmdlet
protected override void ExecuteCmdlet()
{
var office365Tenant = new Office365Tenant(AdminContext);
AdminContext.Load(office365Tenant);
AdminContext.ExecuteQueryRetry();
GetExternalUsers(office365Tenant);
}

Expand Down
3 changes: 1 addition & 2 deletions src/Commands/Admin/SetTenantSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,8 @@ private void SetSiteProperties(Func<TenantOperationMessage, bool> timeoutFunctio
if (ParameterSpecified(nameof(DisableSharingForNonOwners)))
{
var office365Tenant = new Office365Tenant(AdminContext);
AdminContext.Load(office365Tenant);
AdminContext.ExecuteQueryRetry();
office365Tenant.DisableSharingForNonOwnersOfSite(Identity.Url);
AdminContext.ExecuteQueryRetry();
}

if (ParameterSpecified(nameof(HubSiteId)))
Expand Down
1 change: 0 additions & 1 deletion src/Commands/Site/DisableSharingForNonOwnersOfSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ protected override void ExecuteCmdlet()
}

Office365Tenant office365Tenant = new Office365Tenant(context);
context.Load(office365Tenant);
office365Tenant.DisableSharingForNonOwnersOfSite(siteUrl);
context.ExecuteQueryRetry();
}
Expand Down
1 change: 0 additions & 1 deletion src/Commands/Site/GetSharingForNonOwnersOfSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ protected override void ExecuteCmdlet()
}

Office365Tenant office365Tenant = new Office365Tenant(context);
context.Load(office365Tenant);
var isSharingDisabledForNonOwnersOfSite = office365Tenant.IsSharingDisabledForNonOwnersOfSite(siteUrl);
context.ExecuteQueryRetry();

Expand Down
2 changes: 0 additions & 2 deletions src/Commands/Site/SetSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,6 @@ protected override void ExecuteCmdlet()
if (DisableSharingForNonOwners.IsPresent)
{
Office365Tenant office365Tenant = new Office365Tenant(context);
context.Load(office365Tenant);
context.ExecuteQueryRetry();
office365Tenant.DisableSharingForNonOwnersOfSite(siteUrl);
context.ExecuteQueryRetry();
}
Expand Down
Loading