SOLVED

Set Sensitivity label for files in SharePoint library programmatically

Iron Contributor

All files that are stored in a specific SharePoint Online document library (not the site) should be labeled with a sensitivity label (let's say, Public or Confidential).

 

Can this be achieved using PnP PowerShell or Power Automate flows? Document library has 550,000+ files.

 

Thanks in advance!

2 Replies
best response confirmed by ellan1537 (Iron Contributor)
Solution
Unfortunately, didn't find any straight solution for this purpose.

Created a new document library, set the default classification/sensitivity label and then copied over the content to it from the source library (used migration tool). By doing so, it tagged the documents with label.
1 best response

Accepted Solutions
best response confirmed by ellan1537 (Iron Contributor)
Solution
Unfortunately, didn't find any straight solution for this purpose.

Created a new document library, set the default classification/sensitivity label and then copied over the content to it from the source library (used migration tool). By doing so, it tagged the documents with label.

View solution in original post