When we added some private external users for testing to out tenant, we were very satisfied with the results of sharing information. But now we wanted to remove them so they wouldn’t appear anymore when we made a new task or issue.
After we deleted them from the security groups, they still appeared in the people pickers. Even after we deleted the user profiles, they still showed up!
When I posted the question on the Office365 community, August Sun came up with the answer:
Given the situation you encounter, we should use PowerShell to solve the issue. Please try the steps below:
1. Set up the SharePoint Online Management Shell Windows PowerShell environment.
2. Connect to SharePoint Online by the following cmdlet.
Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential firstname.lastname@example.org
3. Run the cmdlet below to get the user information.
Get-SPOUser –Site https://[URL of the site with this issue]
Check whether the external users are listed.
4. If so, run the following cmdlet to remove the users one by one.
Remove-SPOUser –Site https://[URL of the site with issue] –LoginName [user’s login name]
Now, the external users were removed!