Forum Discussion
Apply sensitivity labels using PowerShell
- Sep 16, 2021There is no cmdlet to apply labels to individual files, afaik. Set-AIPFileLabel only works on local files. Using the MIP SDK is probably the way to go, at least until Microsoft introduces a cmdlet/Graph API endpoints.
Funnily enough we do have a cmdlet to remove labels: https://office365itpros.com/2021/03/25/decrypt-sharepoint-online-documents-graph/
Funnily enough we do have a cmdlet to remove labels: https://office365itpros.com/2021/03/25/decrypt-sharepoint-online-documents-graph/
- Sep 16, 2021Vasil, that’s why there’s auto-labeling. The solution is intended to allow tenants to protect existing content at scale without needing anyone to review large quantities of documents.
- JSleiSep 16, 2021Brass Contributorthanks, this answered my question.
- Sep 16, 2021
JSlei Hello again, didn't you look for an option to protect at scale without anyone have to review the documents? Are you saying this isn't applicable even if using PowerShell cmdlets for it?
https://office365itpros.com/2020/01/27/microsoft-previews-auto-label-policies-sensitivity-labels/"Manual application of sensitivity labels is a good way to protect new messages and documents but does nothing to deal with the mass of documents and messages that already exist inside Office 365. To address the issue, Microsoft is running a preview program for auto-labeling Word, Excel, and PowerPoint files stored in SharePoint Online sites and OneDrive for Business accounts (Exchange Online will come later). The solution is intended to allow Office 365 tenants to protect existing content at scale without needing anyone to review large quantities of documents."
- Hari_ShethJan 05, 2024Copper Contributor
VasilMichev I acknowledge that this is old thread.
I have 400+ local word docs that I need to apply label to.
I have done that via set-APIfilelabel cmdlet but when I open those docs in words , its not adding label to the header like it does if I was to manually open file and apply label.
Is there a way to user PowerShell to apply label and also display for word docs?
Regards,
Hari