Set retention label using flow or auto create retention on a folder

Brass Contributor

Have already posted this on the Flow Community but keen to see if anyone has solved this sort of issue for SharePoint Online, automating folder creation and applying retention policies (labels) from compliance center.

 Have been creating a Flow to create folders in SharePoint Online using the Send a HTTP request to SharePoint.

Flow starts with Input Employee Name. 

 

Flow Employee Name.PNG

 

Declares the relative path.relativepath.PNG

Creates the folder using Send http request to create a folder.

Sendhttp1.PNG

 

Then I'm trying to see if I can use the Send http request to SharePoint to set the Retention Label. #Note -this is not a SharePoint classic retention label but the one that comes from the Compliance center labels. 

 

sendhttpretention.PNG

 

So the flow doesn't error. But the retention label is not set.

 

Is this actually possible?

Am I using the correct uri API?

Does the body look correct?

 

Have you solved this another way?

 

Any help would be greatly appreciated. Thanks

0 Replies