Forum Discussion
JSlei
Sep 14, 2021Brass Contributor
Apply sensitivity labels using PowerShell
Is it possible to apply sensitivity labels to documents in SharePoint (not sites or groups) 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/
David Caddick
Oct 27, 2021Iron Contributor
JSlei VasilMichev ChristianJBergstrom
Hi All,
Just bringing a slightly similar scenario to this thread - and wondering if anyone can confirm if it's possible? We have a Client with millions of Docs in Sharepoint 2013 OnPrem today where they have been very rigorous in using TermSet from the TermStore to tag all sensitive docs/files with the appropriate MetaData and this has been in use for some 6 - 7 years.
We are now assisting with the Sharepoint Migration and the question becomes - what is the *best* (least painful/best chance of success) method of ensuring that all the contents get from - Sharepoint 2013 onPrem to Sharepoint Online:
- It appears that SIT's and AutoLabelling cannot identify TermSet?
- This being the case - should we be looking at applying SL's before the move?
- This seems the lower risk?
- Should we focus on MIP SDK or simply script this via PowerShell to Identify each file and add the appropriate SL?
Create and manage terms in a term set - SharePoint in Microsoft 365 | Microsoft Docs
One of the key things we are trying to achieve is do this "at scale" without having to open each file individually - if AutoLabelling is the way to go then fine, but from what we have reviewed so far this is NOT a case where we need to identify docs based on SIT's - the intent is to simply identify docs/files based on TermSet attributes and then apply the matching SL
Any advice or suggestions welcome, we're still researching, but thought it might be worth checking if anyone else has come across this?
- Michael SegnerOct 27, 2021Brass Contributor
The challenges with a manual approach are user error and scalability. Not to mention that once you have completed the project it will only be for a moment in time and if an employee creates a sensitive file 15 minutes after you've finished then it will be missed.
The best way to do this may be this third-party tool (Data Validation & Classification Tools | AvePoint) which will automate this process with AI rules. Disclaimer- I am currently employed by AvePoint.
Hope this helps.