In Martin Lingstuyl’s blog post published on February 15, 2023, he explores how to use code to effectively manage and apply Purview retention labels in Microsoft 365. He highlights that Microsoft Purview is instrumental in creating and deploying retention labels across various platforms such as SharePoint, OneDrive, Teams and Exchange.
These labels contribute significantly towards retaining data for required periods, defining if data should be locked as a record in the meantime or deleted post the retention period. They are particularly helpful in maintaining data essential for legal and compliance requirements but aren't actively in use.
The blog post is part of a larger series that aims at guiding readers around various aspects of managing Purview retention labels from a coding perspective. This includes using Purview event-based retention, addressing inaccurately applied Purview retention labels, dealing with the implications of applying these labels to folders, and utilizing Azure Functions to automate Purview data retention.
Lingstuyl introduces a variety of tools including Security & Compliance PowerShell, Microsoft Graph API, CLI for Microsoft 365, PnP.PowerShell, SharePoint REST API and Client Side Object Model (CSOM), that can be leveraged in conjunction with Purview retention labels.
He then delves into how each of these tools can be used to manage and apply these labels. Insights are shared on how to get a list of retention labels applicable to SharePoint content, correctly map parameters for applying a retention label, clear a retention label, and lock/unlock Record Versioning. Linguyl also talks about how to configure default retention labels for folders, lists/libraries and much more.
He further explains in detail how each of the tools can be utilized with Purview retention labels. For instance, the PowerShell module is largely comprehensive and lets you list, create, update, publish, and delete retention labels. It is also perfect for automation scenarios, due to its potential to connect with both delegated and application permissions.
Microsoft 365 Purview retention labels serve an indispensable role in creating and publishing retention labels which can be further applied to the data in SharePoint, OneDrive, Teams and Exchange. The labels are especially useful for retaining data that is essential for judicial and compatibility reasons. Lingstuyl's blog post series offers a comprehensive guide on how to manage these retention labels, deciphering the options and the ways to use them, all from the programming end. The tools this guide explores are the Security & Compliance PowerShell, Microsoft Graph API, CLI for Microsoft 365, PnP PowerShell, SharePoint REST API and the Client Side Object Model (CSOM).
Read the full article Guide: Using Code to Apply & Manage Purview Retention Labels
The Microsoft 365 Purview tool gives you the capability to create and publish retention labels that you can apply to data in different tools such as SharePoint, OneDrive, Teams and Exchange. In this blog post, we will dive deeper on how you can manage these retention labels and apply them to SharePoint content using code.
The extensive guide provided by Martin Lingstuyl provides multiple options on how you can manage and apply these labels, each with its own advantages and drawbacks. In his blog series, he has thoroughly explored these methods, which includes using Security & Compliance PowerShell, Microsoft Graph API, CLI for Microsoft 365, PnP.PowerShell, SharePoint REST API, and Client Side Object Model (CSOM).
Each tool can be used to manage and apply retention labels in different ways. For managing retention labels, Security & Compliance PowerShell, Microsoft Graph API, and CLI for Microsoft 365 are suggested. All these tools can be used in automation scenario's as well. They have their own strengths and weaknesses, some are complete and can perform all the operations including listing, creating, updating, publishing and deleting retention labels. Some are powerful but still in beta or have limitations.
For applying retention labels to SharePoint content, you can use several tools and approaches. These tools include CSOM, SharePoint REST API, CLI for Microsoft 365, and PnP PowerShell. Be aware that there are also advised routes and those that should be used with caution. This is due to the powerful functionalities each option offers, which need to be used responsibly.
To work with Purview retention labels effectively, you need at least a basic knowledge of several development and automation tools. These may include PowerShell, APIs calls, SharePoint REST API, CSOM and others that are mentioned in the guide. Having this knowledge will greatly improve your ability to manage and apply these labels in multiple scenarios and platforms.
Moreover, the guide also details how to clear a retention label, use Record Versioning, and how to configure default retention labels. You can use several tools for these tasks as well, including CSOM, the SharePoint REST API, the CLI for Microsoft 365, and PnP.PowerShell.
Overall, the guide provided by Martin Lingstuyl is a very extensive and in-depth resource for learning how to manage and apply retention labels in SharePoint using code. It offers lots of examples and options on how to do it, considering all possible scenarios that you might encounter. If you're managing data in SharePoint, this guide is a must read!
Code Guide, Apply Retention Labels, Manage Retention Labels, Purview Retention, Code for Retention, Guide for Purview, Label Application Guide, Label Management Code, Retention Labels Tutorial, Purview Application Code