Update Sensitivity Label on Communication Site
How to update the sensitivity label setting of a SharePoint Online communication site using a Power Automate flow.
URI
Headers
Body
Screenshot with example
Sample data
Classification – Highly Confidential
SensitivityLabelId – 5e06f0a7-9d7b-4dfe-bc22-bb1a43a1ff46
Copy/paste example
Resources
That’s it, Happy testing!
Hi Dennis
Thanks for this guide, much appreciated.
I’m just checking the best way to retrieve the Sensativity Label ID?
Thanks
Simon
Hi Simon,
Do you want to retrieve it manually or do you mean from within a Power Automate cloud flow?
For the manual scenario you can go to Purview click on the sensitivity label to see the details you want to use and find the id in your Network tab of the Developer toolbar. There should GET request with an URL like:
https://compliance.microsoft.com/apiproxy/di/find/Label?tenantId=yourtenantid&filter=Identity eq ‘5e06f0a7-9d7b-4dfe-bc22-bb1a43a1ff46’
Dennis, this is a great post. I am attempting this action and for some reason getting the following error.
{“lang”:”en-US”,”value”:”Attempted to perform an unauthorized operation.”}
If I pass the same patch with the same label as currently assigned to the site, it completes successfully. Thus I cannot change the label from one to another. Any ideas?
I am using an azure app registration and the HTTP action in power automate and I am positive the permissions are correct.