I am looking for the scenario where no user will be able to delete any of the site in SharePoint Online. How to prevent site deletion in share point online?

  • You need to define "site". Is this a Site Collection or a single site in a Site Collection? Apr 4, 2018 at 16:30
  • I want to restrict user from deletion of sub-site in SharePoint Online Apr 10, 2018 at 13:58

3 Answers 3


You can go to the site settings->site permissions, create a permission level which untick “Manage Web site” permission. And then grant the custom permission level to the users who you don’t want to delete the site. enter image description here


Only site collection administrators have the right to delete the site collections. The best way to prevent users from deleting the site collections is to not provide them the SCA access, instead restrict access to Out of the box groups like owner's, contributors etc.


Here is an example to using WebDeleting event to prevent users delete site collection :

public override void WebDeleting(SPWebEventProperties properties)
    properties.Status = SPEventReceiverStatus.CancelWithError;
    properties.ErrorMessage = "This site cannot be deleted.";
    properties.Cancel = true;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.