I've created this function to delete a user from my site collection.

function removeUserFromSite(){
  userHTML = $('#my_SiteUsers option:selected').text();
  //check if default user selected  alert(user);
    var removeConfirm = confirm("You are about to delete "+userHTML+" from SharePoint. Are you sure?");
        userLoginName: user,
    alert("Please select a user");

Error I get in firebug: This operation is available only for a web with unique permissions

I don't understand why I get this if I'm deleting from the Site Collection, what could the collection be inhering from?

1 Answer 1


We've discussed this in the SPServices discussions. It's not a good idea to delete users from a Site Collection even if you could.

From my reply on the thread above:

Think about the instances where the user created or modified content. All of a sudden that content will have no Author or Editor. In some instances, you will even get the dreaded "An unexpected error has occurred".

Managing permissions is the way to go, even if it is painful. Avoid the pain by managing permissions wisely as you go along.

  • Hey Marc, yea I've sense moved around from trying to do this. I'm probably going to start working on a way to find users who aren't in groups. At least that way I can clean things up. If you have any tips for that, that would be great. Thanks for the reply.
    – Batman
    Commented Oct 11, 2013 at 19:44

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.