Site Closure and Deletion via JSON/Flow (SharePoint Online)

Brass Contributor

Does anyone know whether it is possible to enable a specific Site Policy on a sub-site using JSON in Flow with "Send an HTTP request"?  I am able to set the site title using the SP.Web method but site policy seems be via SP.PropertyValues.

<category term="SP.PropertyValues" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" href="web/AllProperties" />
 
Looks like there are two references to the policy:
<d:PolicyName>24 Month Policy</d:PolicyName>
<d:PolicyCTId>0x010085EC78BE64F9478AAE3ED069093B99630029B9C4E1792DBF4BBEBE0C6DABD8A0F3</d:PolicyCTId>
 
I get an error when I try adding these via POST.
{'__metadata':
{
'type': 'SP.PropertyValues'
},
'PolicyName':'24 Month Policy',
'PolicyCTId':'0x010085EC78BE64F9478AAE3ED069093B99630029B9C4E1792DBF4BBEBE0C6DABD8A0F3'
}
 

I'm fairly new to JSON and Flow so I may just have the action code wrong.

0 Replies