SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can I prevent a user from deleting his MySite?

share|improve this question

Another option would be to develop an event receiver for the 'site is being deleted' event and have it canceled.
You can also decide whether you want to show an error message to the user (like: 'you cannot delete your own site!') or not.

You can find some more information on event receivers on Building SharePoint Event Receivers in 2010 post from SharePoint Happenings blog.

share|improve this answer

You might be able to modify the permissions at the web application level through Central Admin.

Manage Web Applications > User Permissions

However, this will limit what the site collection administrator can do on his own site.

Here is a possible code solution to stop the WebDeleting event:

share|improve this answer
+1 on finding the same question on stackoverflow – Rich Bennema May 5 '11 at 18:00

Users are granted site collection administrator rights to their My Site, so they'll have the ability to do so. Aside from training and making sure the sites are backed up routinely, I'm not sure there is anything else that can be done.

Some of the developers round here might have event receiver ideas.

And as Lori mentioned, you can fiddle with the web application permissions, but this would also prevent users from deleting any subsites they create in their My Site.

share|improve this answer

Along the lines of what Eric suggests: You could implement the Site Recycle Bin that is available from Microsoft (supports both sites and site collections). This way if a site was deleted, it could get undeleted again.

share|improve this answer
And in SharePoint 2010 SP1 Site Recycle Bin is included. – Tom Resing Nov 10 '11 at 22:04

If the mysites are in a different web application than other team or publishing sites, you could consider adjusting the web application user permissions to remove the ability to delete the site.

share|improve this answer
You mean by policy? I wonder if that would interfer with the fact that users are site collection administrator on their own site – Anders Rask May 5 '11 at 16:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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