Permanently Delete User from Office 365 – All You Need to Know


Microsoft Office 365 is an application suite which consists of various services & tools like MS Office Online, Exchange Online, Lync Online, etc. One of the most popular tool/ service is Exchange Online. The organizations use Outlook Web Access(OWA) as their web email client & prefer Exchange Online to manage all users’ email mailboxes. In case an employee has left the organization, we should first block their access & secure their data before we consider deleting their account permanently.

There are two ways to permanently delete user from Office 365, which are soft & hard deletion. When you soft delete a user from Office 365 using O365 control panel, they are saved in a recycle bin for 30 days. But after 30 days, the account gets hard deleted (purged), in simple words; the user mailbox gets deleted and cannot be recovered.

Recommended: Before moving forward with the deletion process, we should first backup Office 365 mailbox to keep records of the mailbox data.

Another way to hard delete / deactivate Office 365 user is by using PowerShell commands. To manage the accounts using PowerShell commands, all you need to do is go to the Azure AD (Active Directory).

We will discuss in detail about the method to permanently delete Office 365 mailbox in the following sections.

But first let’s take a look on some user queries on this issue.


Permanently Delete User from Office 365 : User Queries

The few issues or concerns of the users while they try to disable Office 365 email account are as mentioned below.


“Our organization had a user whose mailbox we had migrated to Exchange Online from On Premise. While this process was in progress, the user mailbox got some bug. And this forced us to regenerate the user’s on premise mailbox and transfer all the mails to that new account.

We managed to disable/ disconnect the user’s online mailbox but now we are unable to migrate the new user mailbox while the old mailbox is still there. So now my question is; how to permanently delete Office 365 mailbox so that we can migrate the new mailbox to Exchange Online(Office 365)?”


“I need to remove email account from Office 365. The user is now blacklisted from our organization. So being an IT admin, I am looking for a solution to permanently delete user from Office 365. One method that I am aware of is to wait for 30 days for the soft deleted emails to get deleted automatically from the recycle bin. Is there any other alternative that I am unaware of?


After looking at the user concerns, now let us discuss the scenarios/ cases where a user account can be permanently deleted from Office 365.


Hard Deleted Mailboxes : Deletion Scenarios

A hard-deleted user account is a mailbox that was deactivated/ removed in the following conditions:

  • If the user account is soft deleted, it is moved to the Recycle bin and stays there for 30 days. If the user has been soft-deleted for more than 30 days and the associated Azure AD (Active Directory) user has been hard-deleted. In this case, all mailbox data such as contacts, emails, calendars, and documents will be deleted forever.
  • If the soft deleted user account has been removed using the Remove-Mailbox -PermanentlyDelete cmdlet and parameter in EMS (Exchange Management Shell).
  • If the user account’s associated Azure AD user account has been hard-deleted in the Azure AD. The user account will now be soft deleted in O365/ Exchange Online. If within the retention time period of 30 days, a new Azure Active Directory(AD) user mailbox is created/ synchronized from the original on-premise recipient account with the same ArchiveGuid or ExchangeGuid, and that new account is licensed for Exchange Online, then this will hard delete the original user mailbox from Office 365. Every mailbox data will be lost and cannot be recovered.


Now, after discussing about the user issues & scenarios that disable Office 365 account; let us now explore various methods to permanently delete user from Office 365.


How to Permanently Delete Office 365 Mailbox?

There are various procedures to hard delete a user account in Exchange Online / Office 365. The methods are as follows:

  1. Soft Delete Using EMS & Wait for 30 Days

To remove the user mailbox, you need to have certain permissions.

When you remove an Exchange Online user account using the EMS (Exchange Management Shell), the relating O365 user is deactivated/ disconnected and it is also removed from the list of user mailboxes in the O365 admin center. The user account can still be recovered within 30 days, before the user account gets permanently deleted.


The following command is an example which removes/ disables an Exchange Online account and the corresponding Office 365 user mailbox for XYZ SSA.


Remove-Mailbox -Identity “XYZ SSA”


Note: You could wait for 30 days for hard deletion of the soft deleted account, or you could follow the below procedure to permanently delete Office 365 account.


  1. Permanently Delete Office 365 Account Using PowerShell

To hard delete the above user from Office 365, use the below mentioned command to delete the user mailbox for XYZ SSA from the Azure AD.


Step :1 Run the following command to connect to Azure AD. Enter the admin Username & Password of the Office 365 account.



Step :2  To check the list of all the deleted mailboxes present in the recycle bin, use the following command:

Get-MsolUser –ReturnDeletedUsers

Step :3 Delete email account from Office 365 using PowerShell commands as given below:

i) For Single Mailbox Deletion

Remove-MsolUser –UserPrincipalName [XYZ SSA] –RemoveFromRecycleBin –Force

ii) For Multiple Accounts Deletion

Get-MsolUser –MaxResults 25 -ReturnDeletedUsers | Remove-MsolUser –RemoveFromRecycleBin -Force

Step :4 You may again follow the Step :2 to verify the hard deletion of the mailbox. If the user account is not visible in the recycle bin, it means that the user mailbox is disabled permanently.



In this blog we have explored the two types of deletion of an Office 365 user, various user queries regarding deletion of an O365 user account, several hard deletion scenarios & how to permanently delete user from Office 365. Also it is recommended to first take backup of all user’s data before you remove/ deactivate Office 365 user mailbox.

NOTE: This article is posted AS IS from the original author

Tej Pratap Shukla (Dexter) –