Removing external users from SharePoint Online

SharePoint has many different variations. Along with the others, SharePoint online makes it extremely easy to share sites, lists, libraries or documents with external parties.When you want to share something you can use the sharing feature on SharePoint, enter an email address and a custom message and click send.

When it comes to removing the external user from the site collection, and not just their access but all reference to that user so that they don’t appear in the suggested contacts, this requires a few steps.


First you will need to download the SharePoint Online Management Shell.

Remove a user from the SharePoint Site Collection and SP User Profile list

  1. Go to the site where the user is a member.

  2. Site Settings > People & Groups

  3. Edit the URL and change the “MembershipGroupId=<nn>” to “MembershipGroupId=0

  4. Select the radio box next to a user and click Actions > Delete Users from Site Collection

  5. Remove the user profile from the SharePoint Admin Center.

  6. Start the SharePoint Online management shell.

  7. Run: Connect-SpoService

  8. Sign-in with a global administrator account.

  9. Check the user account you want to remove by running: Get-SPOExternalUser -Filter <emailaddress>

  10. Run: $user = Get-SPOExternalUser -Filter <emailaddress>

  11. Run: Remove-SPOExternalUser -UniqueIDs @($user.UniqueId)

These steps will remove all reference to the user account.

Additional Cmdlets

  • To view a list of users on the first page, run: Get-SPOExternalUser -position 0  -PageSize 5
  • To view a list of users on the second page, run: Get-SPOExternalUser -position 1  -PageSize 50


Have a look at our related Sharepoint blogs here:

Displaying Sharepoint online lists to parent or sub-sites 

Cloud Business logo white
Microsoft Gold Partner Logo - Cloud Business

Cloud Business Limited
8 North Street

2021 © Cloud Business Limited
Registered Company in England and Wales 06798438