Query and Identify Office 365 Security and Compliance related Retention Policies

Square

As you know may be, the GUI of the Office 365 Security and Compliance does not give you much information about your existing retention policies.
Once created, you are not able to view associated labels or some other information you selected previously during the creation process. That makes me crazy and I decided to write and upload a PowerShell script to avoid running into the same situation later. The Data Governance section lists all retention policies created here but also lists all retention policies that were created in the Classifications section. This is the starting point to query all retention policies.

If you use PowerShell to query your retention policies using the Get-RetentionComplianceRule cmdlet, you will receive a very detailed overview but you also see some crypted names beginning with ctptr-* or ctaptr-*. Those objects are type of published labels or auto-applied labels. In order to make the objects “readable”, you have to combine two PowerShell cmdlets (Get-LabelPolicy and Get-RetentionComplianceRule) to get what you want.
This is being done by the PowerShell script available here.

By using the PowerShell cmdlet Get-RetentionCompliancePolicy you will see where your rules are currently applied to.

Leave a Reply

Your email address will not be published. Required fields are marked *