Forum Discussion
SharePoint Online Site Deletion blocked by Retention Policy although no content is retained
Hi everyone,
I'm trying to understand whether this behavior is expected or if other organizations are experiencing the same issue.
Environment
SharePoint Online (Microsoft 365)
Microsoft Purview Retention Policy
Retention duration: 180 days
Trigger: based on last modified date
After retention period: Do nothing
The intention of the policy is not to automatically delete content. We only want to prevent deletion for 180 days and allow deletion afterwards.
Microsoft previously explained to us that retention applies to the content/items, not to the container (the SharePoint site itself).
Problem
We are currently unable to delete SharePoint sites.
When attempting to delete a site from the SharePoint Admin Center we receive the following message:
This site can't be deleted at this time because it is blocked by a compliance policy.
What we already checked
For the affected site:
CompliancePolicyIds = empty
ArchiveStatus = NotArchived
SensitivityLabel = empty
The Preservation Hold Library is empty:
Preservation Hold Library => Items = 0
We also inspected the internal DLC properties of the site and found entries such as:
dlc_sitehaspolicy
dlc_sitehasexpirationpolicy
dlc_webhasexpirationpolicy
Even after clearing these values for testing purposes, the site still could not be deleted.
Important Observation
If we explicitly exclude the site from the retention policy, deletion becomes possible.
This makes it appear that the retention policy is blocking deletion of the site container itself, even though our understanding was that retention should only protect retained content and not permanently prevent deletion of the entire SharePoint site.
Has anyone else observed this behavior?
Additional OneDrive Issue
We are seeing a similar problem with unlicensed OneDrive accounts.
Many of these OneDrive sites:
are already archived
are shown as blocked by retention/compliance
cannot be deleted
remain present for years
For example:
ArchiveStatus = FullyArchived
CompliancePolicyIds = empty
The accounts appear in the list of unlicensed OneDrive accounts, but we are unable to permanently remove them while the retention policy is in effect.
Has anyone found a practical way to clean up or remove these orphaned/unlicensed OneDrive sites when a tenant-wide retention policy is configured?
Questions
Has anyone seen a situation where:
CompliancePolicyIds is empty
the Preservation Hold Library is empty
but site deletion is still blocked by a compliance policy?
Does a retention policy configured as:
Retain for 180 days
Then Do nothing
intentionally block deletion of the entire SharePoint site container?
Is it expected that excluding a site from the retention policy immediately makes deletion possible?
How are other organizations handling site lifecycle management when tenant-wide retention policies are enabled?
Has anyone experienced similar issues with unlicensed OneDrive accounts that cannot be deleted because of retention/compliance requirements?
Any experiences, recommendations, or explanations would be greatly appreciated.
Thanks!
2 Replies
- TheChosen1Tin Contributor
Thats expected. Containers under the hold (eDiscovery or Retention Policies) even if the retention period has passed/expired still can't be deleted. Containers need to be excluded from the holds/retention policies > return success before it they can be deleted.
Sometimes you'll have an invalid retention policies too (most commonly caused by a deleted retention policy that was scoping All for the specific location/workload). This is expected retention behavior. A SharePoint or OneDrive location still included in a retention policy can have site deletion blocked even when the Preservation Hold Library is empty. “Retain 180 days, then do nothing” controls what happens after retention; it does not remove the location from policy scope.
For lifecycle deletion, exclude the site from an all-sites policy, or remove it from a selected-sites policy, then allow up to 24 hours for propagation. Removing a selected site can leave a 30-day grace period; exclusion from an all-sites policy bypasses that grace period.
I would not clear the DLC properties manually. Run the Microsoft 365 “Site deletion” and “Invalid retention or grace eDiscovery hold” diagnostics for the URL instead. They can reveal an invalid or orphan policy, or an eDiscovery grace hold that CompliancePolicyIds does not show. Archived, unlicensed OneDrives are likewise undeletable while any retention policy or hold applies.