web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Set a Sensitivity labe...
Power Automate
Unanswered

Set a Sensitivity label in SharePoint using Power Automate

(2) ShareShare
ReportReport
Posted on by 329

Hello everybody,

 

This question is related to Sensitivity labels in Microsoft 365 Security & Compliance Center.

I have received a business requirement that asks for the following:

"All files that are stored in a specific SharePoint Online document library should automatically be labeled with a sensitivity label (confidential)."

 

Now, I am aware of the out of the box auto-labeling feature inside the Microsoft 365 Security & Compliance Center. But unfortunately, that only works when the system is able to find sensitive content in a document. I know that I can create custom sensitive info types myself.

However, the requirement is that all files should be labeled as confidential automatically.

Let's just suppose that the HR department receives a PDF file by email from an external company, and the HR employee saves this file inside the document library of the HR team site. The PDF file contains sensitive information. Because this is an noneditable PDF file, the sensitivity label will not be applied. I'm just trying to say, you cannot simply control how information is coming in to the organization from external parties.

 

Would it be possible to build a flow that can set the sensitivity label?

 

I know that I can do this for retention labels. I know which trigger to use, but I cannot find the necessary resources to fulfill the requirement. I'm afraid we cannot do this currently... as I could not even find a Microsoft Graph operation for this.

 

Thanks in advance for all help provided!

Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,081 on at

    Hi @jvdlinden,

     

    did you see this

  • jvdlinden Profile Picture
    329 on at

    @VictorIvanidze I haven't found that yet, thanks for sharing.

    The only thing is it only fetches the labels, it doesn't set it.

  • VictorIvanidze Profile Picture
    13,081 on at

    This looks promising also.

  • jvdlinden Profile Picture
    329 on at

    Thanks for sharing the information. Unfortunately, I see that yesterday a comment was posted in that article saying that it applies only to the whole SharePoint site, and not to individual documents. And that is exactly what I'm trying to accomplish. Applying a label to a site is easy, we can do that from the UI as well.

  • xchat Profile Picture
    2 on at

    Hi, I haven´t tested this already, but you can´t just do that from a Flow, you have to do it to the file itself as the label travels with the file no matter the storage. The option would be to create something that implements this article:

     

    Quickstart - Set and get a sensitivity label on a file using the C# MIP SDK | Microsoft Docs

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks @VictorIvanidze through this link I found a solution for getting Sensitivity Label Information with the Graph REST API for single individual Sharepoint Files. The old way with Get-FileSensitivityLabelInfo was outdated in the age of MFA. With Graph I can use an app registration which enhances my security drastically.

    Quite powerful query: https://docs.microsoft.com/en-us/graph/api/listitem-get?view=graph-rest-beta&tabs=http

     

  • WB_Sharevision Profile Picture
    30 on at

    Hi, did you ever find a solution for this?

     

  • jvdlinden Profile Picture
    329 on at

    Unfortunately not. Probably it is not designed this way and never will, but this is just an assumption.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 813

#3
Haque Profile Picture

Haque 526

Last 30 days Overall leaderboard