How to remove an external user from SharePoint Online

Sriram Varadarajan
 
Solution Architect
August 17, 2015
 
Rate this article
 
Views
7974

In this article we can see how to remove an external user from SharePoint online (SPO) with the help of power shell. Execute the powershell scripts  in the below order to remove an external user from SPO

Steps

1. Import-Module "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell"

2. Connect-SPOService -Url https://xyzcorp-admin.sharepoint.com -credential abc@xyzcorp.net

3. $user = Get-SPOExternalUser -Filter i:0#.f|membership|live.com#externaluser@hotmail.com
   $user = Get-SPOExternalUser -Filter external2@outlook.com

4. write-host $user.uniqueid

5. Remove-SPOExternalUser -UniqueIDs @($user.UniqueId)

The above steps would remove the user from  User Information list at Site Collection Level and External accounts List from Tenant Admin at site Collection Level

Category : Office 365, SharePoint

Author Info

Sriram Varadarajan
 
Solution Architect
 
Rate this article
 
Sriram is a Technology Evangelist with 15+ years experience in Microsoft Technologies. He is an enterprise architect working for large pharmaceutical organization which has presence globally with largest Microsoft implementation ...read more
 

Leave a comment