Fix “A compliance policy is currently blocking this site deletion” Error in SharePoint Online

Problem: When trying to delete a SharePoint Online site collection, getting an error message “Can’t Delete Site: A compliance policy is currently blocking this site deletion”.

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

Furthermore, in the SharePoint Admin center, we get an intimation saying, “This site has a compliance policy set to block deletion.” 

This site has a compliance policy set to block deletion.

Root Cause:

This is because of the retention policy enabled for the SharePoint site you want to delete! This means the site is being retained for legal or business reasons and cannot be deleted until the retention period has expired or the hold has been removed. Sites in retention policy will have a special library, “Preservation Hold Library,” to backup data of modified or deleted items.

Solution: Exclude SharePoint Online Site from the Retention Policy!

To delete a site collection, we should exclude it from retention policies. Follow these steps to exclude a site collection from the retention policy in SharePoint Online.

  1. Login to Microsoft 365 admin center
  2. Open the Compliance Admin Center (If you don’t find it, click on “All Admin Centers” on the left side menu and open the “Compliance” link)
  3. In the Compliance Admin Center, expand “Policies” from the left-hand navigation menu bar >> Open the “Retention” link.
  4. Find the Retention policy that protects SharePoint, or there may be a rule protecting everything in Microsoft 365, depending on your settings.
  5. Double-click on that retention rule >> Click on the “Edit” button next to “Applies to content in these locations” >> Click on “Exclude Sites” >> Add the site to delete in the exclude list.
    exclude sharepoint online site from retention policy
  6. Wait for some time (10 to 60 min) for the status to turn: “On – Success” on the next screen.
    edit retention policy in compliance center
  7. Once the site is no longer tied to any compliance policies that could block deletion, you can delete it from the SharePoint admin center, or PowerShell! It should proceed without any errors.

Other than the retention policy, this could be due to the eDiscovery hold policy as well! SharePoint Online: How to Exclude a Site from eDiscovery Hold?


Deleting sites in SharePoint Online can be easily hindered if compliance policies have been applied. Thankfully, Microsoft provides capabilities within the compliance center, admin center, and PowerShell to identify and remove these blocks. Following these instructions will remove the compliance block, so you can fully delete the SharePoint Online site as desired. Once confirmed that compliance is no longer restricting the site, it can successfully be removed. If you still get the error, it could be due to an Invalid retention policy!

Be sure to re-add the site or content to updated compliance policies if still needed for governance. SharePoint Online administrators can troubleshoot and resolve blocked site deletion problems by following the steps outlined here.

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

2 thoughts on “Fix “A compliance policy is currently blocking this site deletion” Error in SharePoint Online

  • This could also be the result of an orphaned retention policy in the tenant. While logged in as a Microsoft 365 Admin, visit to determine if the site has an invalid retention policy applied. See more about this issue at


Leave a Reply

Your email address will not be published. Required fields are marked *