Knowledge base

Asset 32

Permanently remove a user from Office 365

Posted on 25 April 2016 by Beaming Support

Instructions on how to permanently remove a user from Office 365

Upon deleting a user from the Office 365 admin panel they will be placed into ‘Deleted Users’ and held here for 30 days, meaning that should you need to recover the user and related data this can easily be done.

These can be found in the Office 365 Admin Center, under – Users -> Deleted Users

If you wanted to permanently remove a user from Office 365 you would have to use PowerShell, along with having Azure Active Directory with PowerShell module installed on a local machine.

Step one is to connect to your Azure Active Directory via PowerShell by running:

Connect-MsolService. Enter your admin username and password when prompted.

Once logged in you can request the list of deleted users by running:

Get-MsolUser –ReturnDeletedUsers

The above command will give you the list of deleted users along with the UserPrincipalName which will be needed to delete a specific user. To do this, run the following command entering the details of the user in question.

Remove-MsolUser -UserPrincipalName Example@Exampleuser.com –RemoveFromRecycleBin

You will be requested to confirm that you want to continue. Once confirmed the user and related data will be removed from your Office 365 admin panel.

Should you want to remove all the deleted users you can do so by running the below command and using the –Force switch to avoid being prompted upon each user.

Get-MsolUser -ReturnDeletedUsers | Remove-sMsolUser -RemoveFromRecycleBin –Force

Now that you know how to permanently remove a user from Office 365, browse our support archive for more step by step guides.

 

 

Asset 16

We answer real questions asked by businesses

From simple cyber security solutions to O365 migrations and everything in between. Take a look at our knowledge base and benefit from our expertise.

Free Business Guide to Cyber Security

Identify the threats you’re most likely to face and learn the best ways to mitigate them.

  • This field is for validation purposes and should be left unchanged.