Soft-deleted user mailboxes
A soft-deleted user mailbox is a mailbox that has been deleted using the Microsoft 365 admin center or the Remove-Mailbox cmdlet in Exchange Online PowerShell, and has still been in the Azure Active Directory (Azure AD) recycle bin for less than 30 days.
A soft-deleted user mailbox is a mailbox that has been deleted in the following cases:
- The user mailbox's associated Azure AD user account is soft-deleted (the Azure AD user object is out of scope or in the recycle bin container).
- The user mailbox's associated Azure AD user account has been hard-deleted but a Litigation Hold or an eDiscovery hold was placed on the Exchange Online mailbox before it was deleted.
- The user mailbox's associated Azure AD user account has been purged within the last 30 days, which is the retention length Exchange Online keeps the mailbox in a soft-deleted state before it's permanently purged and unrecoverable.
Note
- If you run the Azure cmdlet Remove-MsolUser with the -RemoveFromRecycleBin parameter in order to remove a user from the Azure AD recycle bin, it will always put an existing Exchange Online mailbox associated with the Azure AD user in a soft-deleted state, as long as the user's license was not removed. However, if you remove the user's license prior to removing the user from the recycle bin, the user will not go into a soft-deleted user mailbox state.
- If in the 30-day time period a new Azure AD user is synchronized from the original on-premises recipient account with the same ExchangeGuid or ArchiveGuid, this will result in an ExchangeGuid validation conflict error
Hard-deleted user mailboxes
A hard-deleted user mailbox is a mailbox that has been deleted in the following cases:
- The user mailbox has been soft-deleted for more than 30 days, and the associated Azure AD user has been hard-deleted. Check out the Remove-MsolUser cmdlet. All mailbox content such as emails, contacts, and files will be permanently deleted.
- The user mailbox's associated user account has been hard-deleted in Azure AD. The user mailbox is now soft-deleted in Exchange Online and stays in the soft deleted state for 30 days. If in the 30 days time period a new Azure AD user is synchronized from the original on-premises recipient account with the same ExchangeGuid or ArchiveGuid, and that new account is licensed for Exchange Online, this results in a hard deletion of the original user mailbox. All mailbox content such as emails, contacts, and files will be permanently deleted.
- The soft deleted mailbox has been deleted using the Remove-Mailbox cmdlet with the PermanentlyDelete parameter in Exchange Online PowerShell.
The above scenarios assume that the user mailbox isn't in any of the hold states, like Litigation hold or eDiscovery hold. If there is any type of hold on the user mailbox the mailbox can't be removed from Exchange Online. For all mail user recipient types, Litigation hold or eDiscovery hold are ignored and have no impact on the mail users hard-deleted or soft-delete behavior. The mail user object can't be deleted if there is a journal mailbox associated with it. You can disable journaling on the mail user by using the Disable-JournalArchiving cmdlet
Use the Microsoft 365 admin center to Restore a user account
When you delete an user account, the corresponding Exchange Online mailbox is deleted and removed from the list of mailboxes in the EAC. After the user account is deleted, it's listed on the Deleted Users page in the Microsoft 365 admin center. It can be recovered within 30 days after being deleted. After 30 days, the user account and mailbox are permanently deleted and not recoverable.
- Go to Admin Centre
- Users
- Deleted Users
- Open the deleted user
- Click on restore the mailbox
- After Clicking on restoring the mailbox it will appear in Active users .
- Please assign the License to that User and change the password
- Finally after logging you will be able to see the mails in that Mailbox.
Use Exchange Online PowerShell to restore a user account
You can recover soft-deleted mailboxes using the PowerShell cmdlet below. The cmdlet example below restores the mailbox for Allie Bellew.
- Connect to Exchange Online PowerShell
- Run the Undo-SoftDeletedMailbox cmdlet.
- Undo-SoftDeletedMailbox allieb@contoso.com -WindowsLiveID allieb@contoso.com -Password (ConvertTo-SecureString -String 'Pa$$word1' -AsPlainText -Force)
- In Exchange Online PowerShell, use the following syntax to verify that the mailbox was restored.
- Get-Mailbox <Identity>