Permanently remove a guest user in Office 365

To permanently delete a guest user in your Office 365, follow the steps below.

(1) Check that the account is still active

If your guest user email address is : user1@domain.com then his UserPrincipalName is user1_domain.com#EXT#@tenant.onmicrosoft.com

To check that the guest is still active, use the command lines below

$A = user1_domain.com#EXT#@tenant.onmicrosoft.com
Get-MsolUser -UserPrincipalName $A

GuestExist

(2) How to delete guest user 

Remove-MsolUser -UserPrincipalName $A

RemoveGuest1

(3) Check that guest user account is present in recycle bin

Get-MsolUser -All -ReturnDeletedUsers | ? {$_.userPrincipalName -eq $A}

GuestAlreadyInRecycleBin

(4) How to permanently remove the guest account

Remove-MsolUser -UserPrincipalName $A -RemoveFromRecycleBin

RemoveGuestFromRecycleBin

Voilà 🙂