PurviewTroubleshooting

Purview policy distribution errors: DLP and retention policies stuck pending or in error

Decode Purview distribution errors such as PolicySyncTimeout and FailedToOpenContainer, fix the locations behind them, retry distribution and confirm the policy applies.

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.

Errors this guide fixes

  • We're still processing your policyPurview portal (policy details pane)
  • PolicySyncTimeoutDistributionResults (PowerShell)
  • We couldn't find this locationPurview portal (policy details pane)
  • FailedToOpenContainerDistributionResults (PowerShell)
  • The location is ambiguousPurview portal (policy details pane)
  • The site is lockedPurview portal (policy details pane)
  • The location is out of storagePurview portal (policy details pane)
  • RecipientTypeNotAllowedSecurity & Compliance PowerShell
How this guide is organized: Symptoms → Why it happens → How to fix it → Verify the fix → Prevent it next timeFlow diagram of the article's sections in reading order: 1. Symptoms. 2. Why it happens. 3. How to fix it (6 steps: Find every policy that isn't distributed; Fix the location, in one update; Retry distribution; Check the limits; DLP-specific traps; A policy stuck deleting). 4. Verify the fix. 5. Prevent it next time. Toolbox: Get-AppRetentionCompliancePolicy, New-RetentionComplianceRule, New-AppRetentionComplianceRule, FailedToOpenContainer, DistributionStatus.1Symptoms2Why it happens3How to fix it4Verify the fix5Prevent it nexttime1Find everypolicy that isn'…2Fix thelocation, in on…3Retrydistribution4Check thelimits5DLP-specifictraps6A policy stuckdeletingTOOLBOXGet-AppRetentionCompliancePolicyNew-RetentionComplianceRuleNew-AppRetentionComplianceRuleFailedToOpenContainerDistributionStatusHow this guide is organized: Symptoms → Why it happens → How to fix it → Verify the fix → Prevent it next timeFlow diagram of the article's sections in reading order: 1. Symptoms. 2. Why it happens. 3. How to fix it (6 steps: Find every policy that isn't distributed; Fix the location, in one update; Retry distribution; Check the limits; DLP-specific traps; A policy stuck deleting). 4. Verify the fix. 5. Prevent it next time. Toolbox: Get-AppRetentionCompliancePolicy, New-RetentionComplianceRule, New-AppRetentionComplianceRule, FailedToOpenContainer, DistributionStatus.1Symptoms2Why it happens3How to fix it1Find every policy that isn't distributed2Fix the location, in one update3Retry distribution4Check the limits5DLP-specific traps6A policy stuck deleting4Verify the fix5Prevent it next timeTOOLBOXGet-AppRetentionCompliancePolicyNew-RetentionComplianceRuleNew-AppRetentionComplianceRuleFailedToOpenContainerDistributionStatus
At a glance: how this guide is organized · 6 fix steps · 5 key tools

Symptoms#

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:

Text
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, DistributionStatus isn't Success and DistributionResults names a code such as PolicySyncTimeout or FailedToOpenContainer. Adding a mailbox can also fail with RecipientTypeNotAllowed (in the portal: "You can't apply a hold here").

Why it happens#

From a distribution error to the fix for a DLP or retention policyDoes the distribution status report errors, not only warnings? if Warnings only: Nothing to fix (Microsoft says warnings can be ignored); if Errors: Which kind of error does DistributionResults name? if Sync or timeout: Retry distribution on its own (-RetryDistribution, then leave the policy alone while it's Pending); if A location: Is the location gone or duplicated? if Yes: Remove the location, then retry (Put all location changes in one update); if Locked or full: Unlock the site or raise its quota (Ask the SharePoint admin first, then retry); if Settings not found: Add a rule to the policy (The retention policy has no rules)Does the distribution statusreport errors, not onlywarnings?OKNothing to fixMicrosoft sayswarnings can beignoredWarnings onlyWhich kind of error doesDistributionResults name?FIXRetry distributionon its own-RetryDistribution,then leave the policyalone while it'sPendingSync or timeoutIs the location gone orduplicated?FIXRemove thelocation, thenretryPut all locationchanges in oneupdateYesFIXUnlock the site orraise its quotaAsk the SharePointadmin first, thenretryLocked or fullA locationFIXAdd a rule to thepolicyThe retention policyhas no rulesSettings not foundErrorsFrom a distribution error to the fix for a DLP or retention policyDoes the distribution status report errors, not only warnings? if Warnings only: Nothing to fix (Microsoft says warnings can be ignored); if Errors: Which kind of error does DistributionResults name? if Sync or timeout: Retry distribution on its own (-RetryDistribution, then leave the policy alone while it's Pending); if A location: Is the location gone or duplicated? if Yes: Remove the location, then retry (Put all location changes in one update); if Locked or full: Unlock the site or raise its quota (Ask the SharePoint admin first, then retry); if Settings not found: Add a rule to the policy (The retention policy has no rules)Does the distribution status report errors, notonly warnings?Warnings onlyOKNothing to fixMicrosoft says warnings can be ignoredErrorsWhich kind of error doesDistributionResults name?Sync or timeoutFIXRetry distribution on its own-RetryDistribution, then leave the policy alonewhile it's PendingA locationIs the location gone or duplicated?YesFIXRemove the location, then retryPut all location changes in one updateLocked or fullFIXUnlock the site or raise its quotaAsk the SharePoint admin first, then retrySettings not foundFIXAdd a rule to the policyThe retention policy has no rules
Figure 1 · Decision tree From a distribution error to the fix for a DLP or retention policy. Read DistributionResults with -DistributionDetail, then follow the branch for its code. Fix every location in one update before you retry.

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. The documented causes:

Portal messageDistributionResultsCauseFix
We're still processing your policyPolicySyncTimeoutSync didn't finish in the expected timeRetry
We couldn't find this locationFailedToOpenContainerThe location no longer exists, such as a deleted site or mailboxRemove the location, then retry
The location is ambiguousMultipleInactiveRecipientsErrorMore than one object matches the locationRemove the duplicate, then retry
The site is lockedSiteInReadOnlyOrNotAccessibleLocked by an admin or temporarily by an automated processUnlock, then retry
The location is out of storageSiteOutOfQuotaNot enough storage to apply the policyRaise the quota or delete items, then retry
We can't process your policyActiveDirectorySyncErrorThe policy didn't sync with Microsoft Entra IDRetry
Something went wrong / We ran into a problemPolicyNotifyError / InternalErrorUnspecified errors in the sync pipelineRetry
Settings not foundnoneThe retention policy has no rulesAdd 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.

How to fix it#

1. Find every policy that isn't distributed#

PowerShell
Connect-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 DistributionResults

App-based retention policies (Teams private channels and Viva Engage, and in newer tenants Teams chats, Microsoft 365 Copilot and AI apps) use Get-AppRetentionCompliancePolicy with the same switch. Only act on DistributionResults when the status reports errors; Microsoft says warnings can be ignored. If connecting fails, see fixing Connect-IPPSSession errors.

2. Fix the location, in one update#

Match the code to the table. For deleted or duplicate locations, remove them; after a FailedToOpenContainer error, the service requires the bad locations to be removed in your next update anyway. Put all changes into a single command:

PowerShell
Set-RetentionCompliancePolicy -Identity "Finance - 10 years" `
  -RemoveSharePointLocation "https://contoso.sharepoint.com/sites/OldProject" `
  -RemoveExchangeLocation "former.user@contoso.com"

For a locked or full site, ask the SharePoint administrator to unlock it or raise its quota first; versions kept for retention can fill a site, as explained in the Preservation Hold library article. For RecipientTypeNotAllowed, take out the mailbox type the policy doesn't support. For "Settings not found", add a rule with New-RetentionComplianceRule (or New-AppRetentionComplianceRule).

3. Retry distribution#

In the portal, select the policy name (not its checkbox) to open the details pane and choose Retry. In PowerShell:

PowerShell
Set-RetentionCompliancePolicy -Identity "Finance - 10 years" -RetryDistribution
Set-DlpCompliancePolicy -Identity "DLP - Customer data" -RetryDistribution

-RetryDistribution has its own parameter set, so run it on its own rather than combined with other changes. The policy returns to Pending; leave it alone until that clears.

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). Policies with a static scope also cap specific inclusions or exclusions, for example 1,000 mailboxes or 100 SharePoint sites per policy. If you're near a limit, split the policy or move to adaptive scopes.

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-Object when 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 the fix#

  • Rerun the step 1 script: the policy is gone from the list and DistributionStatus reads Success.
  • 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.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

Intune Subject Matter Expert in Cairo, Egypt, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)