0

Is there way to recover/restore deleted user in SharePoint site?

Scenario: We have deleted users (say 100 user) form a custom permission group and now I want to roll back the action.

Any Suggestions?

  • Did you just remove them from the group, or delete them entirely? – Brandon C. Jun 25 '14 at 7:01
  • Have remove users from specific group – Ashraf khan Jun 25 '14 at 7:20
1

I think you can't roll back this action. You should grant permissions again. If you don't know who has which permissions, you can restore a back-up database to your test environment and find permissions.

Maybe this link can help you.

Good luck..

1

Well, like @compengTR stated, I don't think it is possible to undo action in Sharepoint, as far as I'm aware. So, as far as I know, you have two options. You can either assign the users back into the group manually (which might take a while), or you can use a script, such as JSOM or C#, to assign users back. I can probably quickly write a script to show how to assign one user to a group, and then you can complete it to your needs if you want to use it. This script will be written in C#, but all scripting languages share the same basic "idea" on how to do this.

using (SPWeb myWeb = SPContext.Current.Site.AllWebs["YourSiteName"]) {
  SPGroup myGroup = myWeb.SiteGroups["GroupName"];
  SPUser userToAdd = myWeb.AllUsers["Name_Of_User"];
  myGroup.AddUser(userToAdd);
}
myWeb.dispose();

That's to just add one. I don't what those users would have in common, so I don't know how to get each one and make sure they are right, but that would be how you could script it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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