Checklist
Purview policy distribution errors: DLP and retention policies stuck pending or in error
Based on the article: Purview policy distribution errors: DLP and retention policies stuck pending or in error · 4 min read
A Purview policy does nothing until it has been synced and distributed to every location it targets. If distribution stalls or fails, retention isn't applied, labels don't appear and DLP rules don't fire, while the policy looks perfectly configured. In this post I'll show where distribution errors surface, what each documented message means, how to fix the location behind it, and how to retry and prove the policy is applied.
Symptoms to confirm
- In the Microsoft Purview portal, the Status section of the policy's details pane shows one of these messages. Microsoft documents them for retention and retention label policies:
We're still processing your policy
We couldn't find this location
The location is ambiguous
The site is locked
The location is out of storage
We can't process your policy
Something went wrong
We ran into a problem
Settings not found- In Security & Compliance PowerShell,
DistributionStatusisn'tSuccessandDistributionResultsnames a code such asPolicySyncTimeoutorFailedToOpenContainer. Adding a mailbox can also fail withRecipientTypeNotAllowed(in the portal: "You can't apply a hold here").
Likely causes
Sync and distribution are a prerequisite for enforcement, and Microsoft doesn't support policies that contain errors: resolve every error, or the policy may not work as intended.
| Portal message | DistributionResults | Cause | Fix |
|---|---|---|---|
| We're still processing your policy | PolicySyncTimeout | Sync didn't finish in the expected time | Retry |
| We couldn't find this location | FailedToOpenContainer | The location no longer exists, such as a deleted site or mailbox | Remove the location, then retry |
| The location is ambiguous | MultipleInactiveRecipientsError | More than one object matches the location | Remove the duplicate, then retry |
| The site is locked | SiteInReadOnlyOrNotAccessible | Locked by an admin or temporarily by an automated process | Unlock, then retry |
| The location is out of storage | SiteOutOfQuota | Not enough storage to apply the policy | Raise the quota or delete items, then retry |
| We can't process your policy | ActiveDirectorySyncError | The policy didn't sync with Microsoft Entra ID | Retry |
| Something went wrong / We ran into a problem | PolicyNotifyError / InternalError | Unspecified errors in the sync pipeline | Retry |
| Settings not found | none | The retention policy has no rules | Add a rule |
- Two habits make all of this worse: editing a policy again while it's still Pending, and pushing many small location changes one at a time instead of in a single request.
Checklist
- 1
Find every policy that isn't distributed
powershellConnect-IPPSSession $ret = Get-RetentionCompliancePolicy | ForEach-Object { Get-RetentionCompliancePolicy -Identity $_.Name -DistributionDetail } $dlp = Get-DlpCompliancePolicy | ForEach-Object { Get-DlpCompliancePolicy -Identity $_.Name -DistributionDetail } @($ret) + @($dlp) | Where-Object DistributionStatus -ne "Success" | Format-Table Name,DistributionStatus -AutoSize # Details for one policy Get-RetentionCompliancePolicy -Identity "Finance - 10 years" -DistributionDetail | Select-Object -ExpandProperty DistributionResultsApp-based retention policies (Teams private channels and Viva Engage, and in newer tenants Teams chats, Microsoft 365 Copilot and AI apps) use
Get-AppRetentionCompliancePolicywith the same switch. Only act onDistributionResultswhen the status reports errors; Microsoft says warnings can be ignored. - 2
Fix the location, in one update
Match the code to the table. For deleted or duplicate locations, remove them; after a
FailedToOpenContainererror, the service requires the bad locations to be removed in your next update anyway. Put all changes into a single command:powershellSet-RetentionCompliancePolicy -Identity "Finance - 10 years" ` -RemoveSharePointLocation "https://contoso.sharepoint.com/sites/OldProject" ` -RemoveExchangeLocation "former.user@contoso.com" - 3
Retry distribution
In the portal, select the policy name (not its checkbox) to open the details pane and choose Retry. In PowerShell:
powershellSet-RetentionCompliancePolicy -Identity "Finance - 10 years" -RetryDistribution Set-DlpCompliancePolicy -Identity "DLP - Customer data" -RetryDistribution - 4
Check the limits
A tenant supports up to 10,000 policies of any kind, DLP and sensitivity label policies included. Within that, retention-type policies are capped per workload (for example 1,800 for Exchange, and 13 for SharePoint or OneDrive policies covering all sites).
- 5
DLP-specific traps
- SharePoint sites can't be added to a DLP policy until they've been indexed.
- Scope OneDrive by users or groups, not by site URLs.
- Don't pipe locations through
ForEach-Objectwhen adding or removing them; pass the full list in one call. - Distribution isn't the last step everywhere: changes can take up to four hours to reach Microsoft 365 Copilot, and devices have their own policy sync status (see endpoint DLP device status).
- 6
A policy stuck deleting
If deleting a retention policy fails and it stays in
PendingDeletion, force it:Remove-RetentionCompliancePolicy -Identity "Old policy" -ForceDeletion.
Verify
- Rerun the step 1 script: the policy is gone from the list and
DistributionStatusreadsSuccess. - The portal Status section shows no error for the policy.
- Prove behavior, not just status: test retention as in retention policies not applying, and trigger a test DLP match from a pilot account.
Prevent it next time
- Check the status before every edit and wait while it says Pending.
- Batch location changes into one request.
- When you delete sites or mailboxes, remove them from static-scope policies in the same change.
- Run the step 1 script on a schedule and treat any non-success status as a ticket.
- For more retention messages, see the retention, records and audit errors quick reference.