• Article
  • 11 contributors
  • Applies to:
    SharePoint Online, OneDrive for Business
Feedback

In this article

  1. Symptoms
  2. Cause
  3. Resolution

Symptoms

You might experience one of the following scenarios.

Scenario 1: When you try to delete a Microsoft SharePoint site, you receive the following error message:

Can't delete site.
A compliance policy is currently blocking this site deletion.

Scenario 2: When you try to delete a version of a document that's on a SharePoint site or on a Microsoft OneDrive site, you receive the following error message:

Versions of this item cannot be deleted because it is on hold or retention policy.

Scenario 3: You've excluded or removed a SharePoint site or a OneDrive site from a retention policy. More than 24 hours after you make these updates, you try to delete the affected site or a version of a document on the site. However, the attempt is unsuccessful, and you receive one of the error messages that are mentioned in scenarios 1 and 2.

Scenario 4: You've excluded or removed a SharePoint or a OneDrive site from an eDiscovery hold, the hold stays in grace period for 30 days and prevents the site to be deleted. And you receive the error message that's mentioned in scenario 1.

Cause

Each of these error messages is generated when a retention policy on the affected site blocks a deletion even after you exclude or remove the site from the policy or eDiscovery hold. This indicates that the retention policy might be invalid or there is a grace period for the eDiscovery hold.

Resolution

To verify the validity of the retention policy or grace eDiscovery hold and delete it if it's invalid, run the following test in the Microsoft 365 admin center. You must have Global or Compliance administrator permissions to use the following steps.

 Note

This test isn't available for Microsoft 365 Government, Microsoft 365 operated by 21Vianet, or Microsoft 365 Germany.

  1. Select the Run Tests: Invalid Retention or grace eDiscovery Hold button to populate the associated test in the Microsoft 365 admin center:

  2. In the Run diagnostics section, either type or copy and paste the URL of the affected SharePoint site or OneDrive site.

  3. Select Run Tests.

  4. If the test finds an invalid retention policy that might be blocking the deletion, you can choose to remove the policy.