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

%3CLINGO-SUB%20id%3D%22lingo-sub-443057%22%20slang%3D%22en-US%22%3ESite%20Closure%20and%20Deletion%20via%20JSON%2FFlow%20(SharePoint%20Online)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-443057%22%20slang%3D%22en-US%22%3E%3CP%3EDoes%20anyone%20know%20whether%20it%20is%20possible%20to%20enable%20a%20specific%20Site%20Policy%20on%20a%20sub-site%20using%20JSON%20in%20Flow%20with%20%22Send%20an%20HTTP%20request%22%3F%26nbsp%3B%20I%20am%20able%20to%20set%20the%20site%20title%20using%20the%20SP.Web%20method%20but%20site%20policy%20seems%20be%20via%20SP.PropertyValues.%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%3Ecategory%3C%2FSPAN%3E%20%3CSPAN%3Eterm%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22SP.PropertyValues%22%3C%2FSPAN%3E%20%3CSPAN%3Escheme%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fado%2F2007%2F08%2Fdataservices%2Fscheme%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fado%2F2007%2F08%2Fdataservices%2Fscheme%3C%2FA%3E%22%3C%2FSPAN%3E%20%3CSPAN%3E%2F%26gt%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%3Elink%3C%2FSPAN%3E%20%3CSPAN%3Erel%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22edit%22%3C%2FSPAN%3E%20%3CSPAN%3Ehref%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22web%2FAllProperties%22%3C%2FSPAN%3E%20%3CSPAN%3E%2F%26gt%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3ELooks%20like%20there%20are%20two%20references%20to%20the%20policy%3A%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%3Ed%3APolicyName%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%3E24%20Month%20Policy%3C%2FSPAN%3E%3CSPAN%3E%3CSPAN%3Ed%3APolicyName%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%3Ed%3APolicyCTId%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%3E0x010085EC78BE64F9478AAE3ED069093B99630029B9C4E1792DBF4BBEBE0C6DABD8A0F3%3C%2FSPAN%3E%3CSPAN%3E%3CSPAN%3Ed%3APolicyCTId%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EI%20get%20an%20error%20when%20I%20try%20adding%20these%20via%20POST.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7B'__metadata'%3A%3CBR%20%2F%3E%7B%3CBR%20%2F%3E'type'%3A%20'SP.PropertyValues'%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E'PolicyName'%3A'24%20Month%20Policy'%2C%3CBR%20%2F%3E'PolicyCTId'%3A'0x010085EC78BE64F9478AAE3ED069093B99630029B9C4E1792DBF4BBEBE0C6DABD8A0F3'%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3EI'm%20fairly%20new%20to%20JSON%20and%20Flow%20so%20I%20may%20just%20have%20the%20action%20code%20wrong.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New 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