/
/

How to Configure Microsoft Teams Retention Policies for Regulatory Compliance

by Andrew Gono, IT Technical Writer
How to Configure Microsoft Teams Retention Policies for Regulatory Compliance blog banner image

Your Microsoft Teams retention policy determines how chat logs and channel data are secured, stored, and deleted. As such, sysadmins must adhere to international data management regulations to ensure full security and minimize risk exposure.

Here’s how to achieve Microsoft Teams compliance in Windows 11 with advanced tools, FAQs, and the best deployment strategies.

Optimize your Microsoft Teams retention policy

Before configuring your Microsoft Teams environment, outline your technological constraints, scope, and goals for smooth deployments.

📌 Prerequisites:

  • Microsoft 365 E3/E5 license or Microsoft 365 Compliance add-on
  • Compliance Administrator or Global Administrator role
  • Microsoft Purview access (https://compliance.microsoft.com)
  • Teams messages must be stored in Exchange mailboxes
  • PowerShell access with Exchange Online and Compliance modules
  • Endpoint policies configured via GPO or registry (optional)

📌 Recommended deployment strategies:

Click to Choose a Method💻

Best for Individual Users

💻💻💻

Best for Enterprises

Method 1: Create a Teams retention policy in Microsoft Purview
Method 2: Configure retention using PowerShell
Method 3: Monitor and report on retention status
Method 4: Use Registry Editor to support Teams policy integrity
Method 5: Use Group Policy to prevent retention policy workarounds
Method 6: Use CMD and CLI tools for compliance verification

Method 1: Create a Teams retention policy in Microsoft Purview

📌 Use Cases: Configure data storing policies for Teams chats and monitor compliance.

📌 Prerequisites: Microsoft 365 Enterprise

  1. Open the Microsoft Purview Compliance Portal.
  2. Go to Microsoft 365 locations and select Microsoft 365.
  3. Select Retention Policies > Create.
  4. Choose Static or Adaptive policy type.
    1. Adaptive scopes need Azure AD attributes and are ideal for large organizations with multiple, shifting roles.
  5. Select Teams chats and/or Teams channel messages as locations
  6. Choose retention settings:
    1. Retain items for X days/months/years
    2. Delete items after retention ends (optional)
    3. Retain-only policy (preserve without deletion)
  7. Apply policy to users or groups (or all).
  8. Name the policy appropriately (e.g., User Mailboxes Retention).
  9. Create the policy.

💡 Note: Teams chats are stored in individual user mailboxes; channel messages are stored in Microsoft 365 Group mailboxes.

Method 2: Configure retention using PowerShell

Here’s how to use PowerShell to manage Teams retention policies.

📌 Use Cases: Write comprehensive scripts for at-scale deployments and modify present policies.

  1. Type Win + R, type powershell, and press Ctrl + Shift + Enter.
  2. Connect to Security & Compliance Center:

Connect-IPPSSession

    1. Ensure Exchange Online Management Module v2 is installed.
  1. Create a new retention policy:

Set-RetentionCompliancePolicy -Identity "TeamsRetentionPolicy" -TeamsChatLocation All -TeamsChannelLocation All

  1. Create a retention rule:

New-RetentionComplianceRule -Name "TeamsChats90Days" -Policy "TeamsRetentionPolicy" -RetentionDuration 90 -RetentionAction KeepAndDelete

    1. Retention Duration should be in days.
    2. You may also use other parameters to base your retention policies on specific mailboxes.
  1. Verify policy settings:

Get-RetentionComplianceRule -Policy "TeamsRetentionPolicy"

Method 3: Monitor and report on retention status

📌 Use Cases: Track and monitor retention actions in Teams (e.g., deletion events, app failures, etc.)

📌 Prerequisites: Microsoft Purview.

  1. Go to Microsoft Purview > Data lifecycle management.
  2. View active policies and status.
  3. Go to Audit > Audit Search to track retention actions:
    1. Message deletion events
    2. Retention hold operations
    3. Policy application failures
  4. Use Content Search for a deeper investigation.
  5. Export logs as needed for audits or incident response.

Check Microsoft’s official audit log retention guide to see how long your Teams data can be held based on license type.

Method 4: Use Registry Editor to support Teams policy integrity

⚠️ Warning: Editing the registry can cause system issues. Create a backup before proceeding.

📌 Use Cases: Prevent users from downloading or uploading data for Microsoft Teams compliance.

  1. Type Win + R, type regedit, and press Ctrl + Shift + Enter.
  2. Navigate to:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Office\16.0\Teams

    1. If you don’t see the Teams key:
      1. Right-click on the 16.0 folder.
      2. Select New > Key.
      3. Name it “Teams.”
      4. Click Enter.
  1. Create or modify the following DWORD values:
    1. DisableLocalCaching
      1. Set its value to 1 to prevent local chat storage.
    2. BlockDownloadLocation
      1. Set its value to 1 to stop users from downloading files to on-device storage.
    3. PreventFileUpload
      1. Set its value to 1 to block uploads from the local cache to Teams.
  2. Close Registry Editor.
  3. Restart Teams or reboot the workstation to apply your changes.

Method 5: Use Group Policy to prevent retention policy workarounds

Tailor company-wide settings to your Microsoft Teams retention policy needs.

📌 Use Cases: Limit unsanctioned message receipts.

📌 Prerequisites: Windows 11 Pro, Enterprise, Education

  1. Type Win + R, enter gpedit.msc, and press Ctrl + Shift + Enter.
  2. Navigate to:

User Configuration > Administrative Templates > Microsoft Teams

  1. Enable policies such as:
    • Prevent file download
    • Block cloud storage apps (Dropbox, Google Drive)
    • Disable Teams chat for certain users/groups
  2. Click Apply, then OK.
  3. Restart Teams or reboot the workstation to apply your changes.

Method 6: Use CMD and CLI tools for compliance verification

Here’s the step-by-step process for managing your Teams retention policy with command-line tools.

📌 Use Cases: Diagnose Teams policy enforcement gaps or trigger a policy refresh.

📌 Prerequisites: Microsoft Teams Admin Center (CLI)

  1. Type Win + R, type cmd, and press Ctrl + Shift + Enter.
  2. Check the Teams client installation paths:

where teams.exe

  1. Check Teams logs for retention-related sync issues:

%appdata%\Microsoft\Teams\logs.txt

  1. Run GPResult to confirm applied policies:

gpresult /h policyreport.html

  1. Run this to verify license assignment via Microsoft Graph:

az ad user show --id [email protected]

  1. Check the device’s join status:

dsregcmd /status

  1. Refresh your local policy:

gpupdate /force

⚠️ Things to look out for

RisksPotential ConsequencesReversals
Misconfigured retention labels in Microsoft PurviewIllegal retention of Teams dataRevert policy or restore from a backup
Incorrect cmdlet usedAccidental retention or deletionRun Get-* cmdlets to audit past events
Changes clash with other GPOsConfiguration is overriddenAdjust your GPO to comply with your organization’s standards

Important considerations for Microsoft Teams compliance

Remember these key points when configuring Microsoft Teams retention policies.

Retention labels vs policies

Retention policies let you automate the management process on mailboxes, Teams messages, and SharePoint sites. Labels offer item-level control with conditions and classifiers used to organize, retain, or delete specific emails and documents.

Policy hierarchy

Retention is prioritized over deletion policies. Moreover, if multiple retention policies are in effect, the one with the longest holding time is used. This is done to comply with international standards and prevent premature removals.

Teams private channels

Since private channel messages are stored in individual user mailboxes, ensure that you explicitly target these inboxes.

Preservation Hold Library

Whenever an employee modifies or deletes anything outlined in your Teams retention policy, that content is cached in the Preservation Hold Library (SharePoint/OneDrive) or the Recoverable Items Folder. Both are inaccessible to end-users.

How to troubleshoot your Microsoft Teams retention policy

Here are proven solutions for the most common Teams retention policy roadblocks.

The policy isn’t applying

If your Teams retention policies aren’t working, double-check your mailbox mapping or if you have a supported license (e.g., Office 365 E3 or A3), as they rely on both.

Teams retention policy isn’t enforced

According to Microsoft’s official documentation, a new retention policy takes up to seven days of backend processing to propagate fully. Keep this factor in mind during audits.

Deleted messages are recoverable

Deleted messages may still be held in a secured location via eDiscovery hold, litigation hold, or a separate retention policy for future audits. These will be retrievable until their retention period ends.

Chat retention isn’t visible

To verify your Teams chat and channel data are being retained, use Content Explorer, Mailbox Search, or this PowerShell command:

Get-RetentionCompliancePolicy -Identity "<PolicyName>" -DistributionDetail | FL DistributionStatus

Replace <PolicyName> with the name of your preferred Teams retention policy in Microsoft Purview (Data Lifecycle Management > Microsoft 365 > Retention Policies).

NinjaOne services

NinjaOne serviceWhat it isHow it enhances your retention policy
Deploying registry or GPO changes remotelyEmpowers IT pros to centrally manage Registry/Group Policy changesConsistently enforces local settings that work in tandem with your Teams retention policy
Automating audit tasksProvides a hands-free approach to backup verification and compliance checksChecks that your enterprise is always audit-ready
Alerting and reportingSends real-time warnings when backups fail or GPOs conflictDetects retention policy compliance drift early and generates data for documentation
Cross-tenant visibilityAllows sysadmins to monitor multiple clients or organizational units from a single pane of glassAssists IT staff and MSPs in monitoring newly configured Teams environments
Incident integrationReduces manual effort with intuitive backup policy managementGenerates tickets automatically when the Teams data is tampered with

Craft robust policies for Microsoft Teams compliance

Your Microsoft Teams retention policy dictates how long your company’s messages are stored and/or deleted. These policies are enforced for general data safety and adherence to international regulations, so keep these methods in mind for complete compliance.

Leverage automated solutions to effortlessly align your enterprise with HIPAA, MiFID II, GDPR, and other global data safety standards.

Related topics:

FAQs

Standard and private channel messages are retained indefinitely by default unless a Teams retention policy applies a retention period.

By default, Microsoft Teams retains data indefinitely, but the holding period can be customized to fit your organization’s standards.

A policy-based solution that automatically captures and saves calls, meetings, and webinars on Microsoft Teams as per regulation.

You might also like

Ready to simplify the hardest parts of IT?