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

updatesensitivitylabeloncommunicationsite

Copy/paste example

Resources

SP.Site Object

That’s it, Happy testing!

You may also like...

3 Responses

  1. Simon Wraith says:

    Hi Dennis

    Thanks for this guide, much appreciated.

    I’m just checking the best way to retrieve the Sensativity Label ID?

    Thanks
    Simon

  2. Dennis says:

    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’

  3. james penna says:

    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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.