How to remove an external user from SharePoint Online


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

SharePoint Office 365 Tool
Simple & Powerful Tool for Migration, Security & Reporting. Free Trial


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

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

KWizCom Forms App