I am trying to set some property bag values in SharePoint Online, specifically around SharePoint Designer access. The code below runs without error, but I do not see the propertybag value being updated in /_layouts/15/SharePointDesignerSettings.aspx
. Is it not possible to update PropertyBag values in SharePoint Online?
$SiteUrl = "https://tenant.sharepoint.com/teams/eric"
$context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)
$context.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($credential.UserName, $credential.Password)
$web = $context.Site.RootWeb
$props = $web.AllProperties
$props.FieldValues["allowdesigner"] = 0
$web.Update()
$context.ExecuteQuery()