Skip to content

Instantly share code, notes, and snippets.

@AsishP
Created February 8, 2018 02:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AsishP/2b83ad27f7370fc973577aeef5abc805 to your computer and use it in GitHub Desktop.
Save AsishP/2b83ad27f7370fc973577aeef5abc805 to your computer and use it in GitHub Desktop.
Update Property bag in Modern Team Sites
using Microsoft.Online.SharePoint.TenantAdministration;
using (var contextTenant = new ClientContext(<spTenantUrl>))
{
contextTenant.Credentials = new SharePointOnlineCredentials(<username>, <secpass>);
Tenant tSP = new Tenant(contextTenant);
tSP.SetSiteProperties(<groupurl>, noScriptSite: false);
contextTenant.ExecuteQuery();
}
contextGroup.Web.SetPropertyBagValue("ProvisioningStatus", "Completed");
contextGroup.Web.Update();
contextGroup.ExecuteQuery();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment