Removing "all" users from a SharePoint site

%3CLINGO-SUB%20id%3D%22lingo-sub-1751085%22%20slang%3D%22en-US%22%3ERemoving%20%22all%22%20users%20from%20a%20SharePoint%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1751085%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3EHow%20would%20one%20efficiently%20(i.e.%2C%20automatically%2Fin%20bulk)%20remove%20all%20users%20from%20a%20SharePoint%20site%3F%3C%2FSTRONG%3E%20This%20would%20include%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3ERemoving%20all%20users%20from%20Groups%20that%20have%20access%20rights%20within%20the%20site%3C%2FLI%3E%3CLI%3ERemoving%20all%20users%20who%20have%20been%20granted%20permissions%20directly%20to%20a%20site%20resource%20(file%2C%20item...)%3C%2FLI%3E%3CLI%3EDeleting%20all%20outstanding%20Sharing%20Invitations%3C%2FLI%3E%3C%2FUL%3E%3CP%3EWe%20are%20hoping%20to%20archive%20sites%20by%20keeping%20them%20in%20place%20with%20only%20administrative%20access%20(Global%20Admin%20or%20Collection%20Admin).%20We%20need%20to%20archive%20a%20select%20number%20of%20sites%20within%20a%20collection%2C%20while%20keeping%20others%20in%20production.%20So%20this%20request%20is%20specific%20to%20a%20site%20within%20a%20collection%2C%20and%20not%20collections.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1751085%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPermissions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EUsers%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Contributor

How would one efficiently (i.e., automatically/in bulk) remove all users from a SharePoint site? This would include:

 

  • Removing all users from Groups that have access rights within the site
  • Removing all users who have been granted permissions directly to a site resource (file, item...)
  • Deleting all outstanding Sharing Invitations

We are hoping to archive sites by keeping them in place with only administrative access (Global Admin or Collection Admin). We need to archive a select number of sites within a collection, while keeping others in production. So this request is specific to a site within a collection, and not collections.

 

Thank you.

0 Replies