How to remove an external user from SharePoint Online

Sriram Varadarajan
Enterprise Architect
Published On :   17 Aug 2015
Visit Count
Today :  2    Total :   5813
Plan, Migrate, Secure, Report
SharePoint & Office 365 Tool. Simple & Easy to Use. 15-Day Trial!

Sharegate: Kick-Ass Tool
Think Your SharePoint & Office 365 Are Secure ? Find Out Now!

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


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

2. Connect-SPOService -Url -credential

3. $user = Get-SPOExternalUser -Filter i:0#.f|membership|
   $user = Get-SPOExternalUser -Filter

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

SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.

Migratiin Tools for SharePoint