It is handy to delete user mailboxes from Exchange Online anytime as its interface only includes this option. But for your information, if you delete the user mailbox from the Exchange Online account, it does not get deleted permanently; rather it gets soft-deleted. By soft-deleted, it means that there is an option to recover this mailbox within 30 days. The deleted mailbox gets saved at the Azure Active directory recycle bin and also known as disabled or disconnected mailboxes as these get disconnected from the related account and removed from the Active Directory but still in retention if soft-deleted. Within the retention period, these disconnected mailboxes can be reconnected to the new or existing user mailbox (not associated with another mailbox).
Let us list the conditions where a user mailbox is soft-deleted and when it gets deleted permanently (hard-deleted).
Exchange Online user mailboxes deletion conditions
An Exchange Online user-mailbox is soft-deleted (temporarily deleted),
- If it is deleted from the Office 365 user-interface
- If it is deleted by removing the Exchange Online license assigned to it
- If the Azure active directory user account related to the user mailbox is deleted permanently and the Exchange Online mailbox is in a litigation hold
An Exchange Online user-mailbox is hard-deleted (permanently deleted),
- If the soft-deleted user mailbox has exceeded the retention period and the related Azure Active directory account is permanently deleted
- If the soft-deleted user mailbox is deleted using PowerShell cmdlet (Remove-Mailbox cmdlet, PermanentlyDelete parameter)
So, now you know what will happen to your user mailbox after deletion, let us have a look at the deletion methods. There are two ways to delete a user mailbox in Exchange Online:
Using Windows PowerShell and using Admin Center
We will start with the more complex method first, i.e. Deletion of user mailboxes through Windows PowerShell commands. Let us know how.
Note: To perform both the methods, users must have administrative rights for the Exchange Online account.
Using Windows PowerShell commands
Run Windows PowerShell application in your system as an administrator and perform the given steps:
- To connect your Exchange Online account here, run this command:
$UserCredential = Get-Credential
- Next, you are required to provide the global administrator credentials for your Exchange Online account and then click on OK.
- Run this command to form a connection between the application and the account.
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic –AllowRedirection
- Next, run this command in PowerShell.
Import-PSSession $Session –DisableNameChecking
- Now, you have successfully connected Exchange Online to the Windows PowerShell and can execute any command on the Exchange Online account mailboxes.
- For deleting a user mailbox in Exchange Online, run this cmdlet.
Remove-Mailbox -Identity <mailbox identity>
- If you need to delete a user mailbox permanently, use this command.
Remove-MsolUser -UserPrincipalName <mailbox identity>-RemoveFromRecycleBin
Note: You can get information about the deleted Exchange Online user mailboxes available in Deleted folder of the mailbox (still in retention period) using this command.
If run with care and technicality, this method is feasible for all users who want to delete the user mailbox either temporarily or permanently from their Exchange Online account. Otherwise it seems a complicated and unlikeable solution for the naïve users.
There is another most easy way to delete the user mailbox from Exchange Online. Let us see how it works.
Using Office 365 Admin Center
Log in to your Exchange Online account as the administrator. Click on the Admin option from the welcome screen. From the Users category, select the Active Users option. Select the user which you want to delete and then from the top-given options, click on Delete user option.
This will delete that user mailbox temporarily. You can delete it forever using the above provided cmdlet in PowerShell. To delete multiple mailboxes you can select multiple mailboxes and perform the bulk-deletion as well.
Note: After deletion of any user mailbox from Exchange Online account, remove the license assigned to it as well to avoid any further cost on it. For that, follow Billing>Subscriptions on your Microsoft 365 account. Choose the subscription for the respective accounts one by one and click Remove option to remove the subscribed license from the account. The same happens when any user delete or remove the license of the user mailbox account from Exchange Online, the data within the user mailbox retains for about 30 days and after that gets permanently deleted. In this particular time, users can reassign the license to the user mailbox again to make it active.
The administrator needs to delete the user mailbox when it is old, not-in-use or occupying unnecessary storage space. Deleting that mailbox is a wise decision only if you do not need its content in future. But exporting that mailbox from the Exchange Online to another secure location can be followed to access its content whenever required. This will save the storage space also, reduces the traffic and keep data availability whenever required.
For Office 365 or Exchange Online data backup, we suggest you one of our efficient and most used software, Office 365 Backup to PST tool. It allows taking backup of the required Office 365 user mailboxes data and saving it to the Outlook database file, PST format. In this way, data is saved at a secured PST location, which you can access anytime in your Outlook application. The tool widely supports all Office 365 plans and subscriptions that are compatible with all Outlook versions.
Deleting Exchange Online user mailboxes (temporarily and permanently) is an easy task with two manual solutions – through Windows PowerShell and Admin feature in Exchange Online. Another alternative for saving user mailbox data to a different destination is encouraged with an advanced backup tool’s recommendation.