As a SharePoint Online administrator, sign in to the site collection that was shared with the external user.
Click the gear icon for the Settings menu, and then click Site settings.
In the Users and Permissions section, click People and groups.
At the end of the URL in your browser window, after the people.aspx? part of the URL, replace MembershipGroupId=<number> with MembershipGroupId=0, and then press Enter.
In the list of users, locate the name of the external user. Right-click the user name, and copy the shortcut.
In a new browser window or tab, paste the URL that you copied in the previous step into the address box. Add &force=1 to the end of the URL, and then press Enter.
In the Account field, review the email address. For example, i:0#.f|membership|JonDoe@contoso.com.
Remove the user from the Site Collection
Add the User email address back in