Removing External Users from SharePoint Online

   Back to blog listing

Posted by David Bishop on 17-Aug-2015 10:33:00
David Bishop
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.share

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.


 

Pre-requisites

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

http://www.microsoft.com/en-gb/download/details.aspx?id=35588

 

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 https://domain-admin.sharepoint.com

  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

 Resources

https://technet.microsoft.com/en-us/library/jj730438.aspx
http://technet.microsoft.com/en-us/library/jj730437(v=office.15).aspx

 

 

 


 

Have a look at our related Sharepointblogs here;

Displaying Sharepoint online lists to parent or sub-sites 

Topics: Office 365, sharepoint, Office 365 support