Find a Microsoft 365 User’s Retention Policy with PowerShell
Question details
Identify Microsoft 365 retention policies that may apply to a user and investigate a policy distribution error.

- Product
- Microsoft Purview and Microsoft 365
- Device & OS
- not provided
- Scenario
- An administrator needs to check a user’s retention coverage when multiple policies may overlap.
- Observed behavior
- Get-RetentionCompliancePolicy does not clearly identify effective assignment by user, and a policy reports a distribution error with a deployment delay.
Identify the user’s email address, the policy name, and the Microsoft 365 locations you need to check, such as Exchange mailboxes or OneDrive accounts. Use an account with the necessary Microsoft Purview permissions and install the Exchange Online PowerShell module if it is not already available.
Review Purview retention policy locations and distribution details
Use Security & Compliance PowerShell to find policies that may cover the user and inspect deployment errors.
Get-RetentionCompliancePolicy does not provide a single effective-assignment result for every user and workload. Compare policy locations and exclusions with the user’s mailbox, OneDrive account, or other relevant location; check group and adaptive scope membership where applicable.
More than one policy can apply to the same content. Applicable retention settings are resolved according to Microsoft’s retention principles, so overlapping policies are not automatically a conflict.
Open PowerShell and run Connect-IPPSSession, then sign in with an account authorized to view retention policies.
Run Get-RetentionCompliancePolicy -DistributionDetail | Format-List * to review policies, their enabled state, locations, exclusions, and distribution information. If needed, inspect one policy with Get-RetentionCompliancePolicy -Identity "Policy Name" -DistributionDetail | Format-List *.
In the output, check the relevant location and exception properties for the user’s workload. In the Microsoft Purview portal, open Data lifecycle management > Microsoft 365 > Retention policies and select the policy to review its configured scopes and locations.
Review the policy’s distribution details and error message in PowerShell or the Purview portal. If the message says deployment may take two additional hours, allow that time and check the status again.
If distribution remains in Error or deployment exceeds the expected time, open a Microsoft 365 support request. Include the policy name, tenant details, distribution status, and relevant error text; do not share passwords or credentials.

Check whether the user has an Exchange mailbox retention policy
Use this check if the policy was assigned through Exchange rather than Microsoft Purview.
Work with Office documents in WPS Office
WPS Office is a free, lightweight alternative for working with documents, spreadsheets, and presentations. Its familiar interface and Office format compatibility make it easy to move existing files, although it does not manage Microsoft 365 retention policies or resolve Purview deployment errors.

Frequently Asked Questions
Can one PowerShell command show every retention policy effective for a user?
Get-RetentionCompliancePolicy lists policy settings, but it does not give a complete effective-assignment result for every user and workload. Review locations, exclusions, group or adaptive scope membership, and the relevant content location.
What should I do if the policy distribution status is Error?
Run Get-RetentionCompliancePolicy -Identity "Policy Name" -DistributionDetail | Format-List * and review the error details. Allow the time stated in the message, then contact Microsoft 365 support if the error persists or deployment exceeds the expected time.
Does a mailbox retention policy include the user’s OneDrive files?
No. Check the OneDrive location and exclusions in the Purview retention policy separately from its Exchange mailbox settings.
How do I tell whether the policy is an Exchange retention policy?
Run Get-Mailbox -Identity "user@example.com" | Format-List RetentionPolicy in Exchange Online PowerShell. The returned assignment is an Exchange messaging records management policy, which is separate from a Purview retention policy.




