Hi there,
i would be glad, if someone can help me in the following case:
I have an rentention policy for a site collection working. In the property bag of these site collection i can find values for the properties "closeDate" and "deleteDate", which comes with this policy.
I try to find a solution for updating the "closeDate" value with a flow.
Any ideas or suggestions please :)!?
Thanks for any help.
Andreas
Thank you @Expiscornovus, it worked! Do you know if it is also possible to set the new property as indexed using Power Automate?
Thanks for your answer, Expiscornovus.
Unfortunatly I had not the time for testing it. But on the first view it looks great.
I let you know if it works for me 😉
Greetings
Andreas
Hi @Andreas_K,
I assume the DenyAddAndCustomizePages setting is disabled on the site. If not, you have to disable that first.
If that is the case you could use the CSOM XML, shared by tavikukko over here:
https://github.com/pnp/pnpjs/issues/2067
Below is an example of how to update the rootweb of a site collection using such a POST request
In this example I am updating a property called customDepartment to a value IT.
Uri
_vti_bin/client.svc/ProcessQuery
Headers
{
"Accept": "*/*",
"Content-Type": "text/xml;charset=\"UTF-8\"",
"X-Requested-With": "XMLHTTPRequest"
}
Body
<Request xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="MyApplicationName">
<Actions>
<Method Name="SetFieldValue" Id="9" ObjectPathId="4">
<Parameters>
<Parameter Type="String">customDepartment</Parameter>
<Parameter Type="String">IT</Parameter>
</Parameters>
</Method>
<Method Name="Update" Id="10" ObjectPathId="2" />
</Actions>
<ObjectPaths>
<Identity Id="2" Name="740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:@{variables('SiteId')}:web:@{variables('WebId')}" />
<Property Id="4" ParentId="2" Name="AllProperties" />
</ObjectPaths>
</Request>
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492