What are Soft Deleted Mailboxes in Office 365?
Soft deleted mailboxes belong to users that an admin deleted. Exchange Online retains the mailbox and its content for 30 days. After 30 days the mailbox is purged and cannot be recovered.
Microsoft states this on its page for deleting and restoring mailboxes. The admin center cannot restore a user mailbox. You restore with Exchange Online PowerShell.
Exchange Online has no New-MailboxExportRequest cmdlet. You restore the mailbox first and export it second.
| Step | Tool | Cost |
|---|---|---|
| Restore the mailbox | Admin center or PowerShell | Free |
| Export the mailbox to PST | Purview content search | Free |
| Export with filters and a report | Office 365 Export tool | Paid |
How do You Connect to Exchange Online PowerShell?
Older guides use New-PSSession with Basic authentication. Microsoft removed Basic authentication for Remote PowerShell, so those commands fail. Microsoft explains the removal on its page about Basic authentication in Exchange Online.
Install the ExchangeOnlineManagement module and connect with modern sign in. Find the options on the Microsoft page about connecting to Exchange Online PowerShell.
Install-Module -Name ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName admin@contoso.comReplace admin@contoso.com with your admin address. A sign in window asks for your password and MFA.
How do You Restore Soft Deleted Mailboxes?
Method #1: Restore the User or Use Undo-SoftDeletedMailbox (Free)
Who it suits. Admins who deleted the user in the last 30 days. Extra application. PowerShell.
Restore the deleted user in the Microsoft 365 admin center when the mailbox went away with the user. Microsoft says a deleted user is recoverable for 30 days.
Use PowerShell to restore the mailbox with its address and a new password.
Undo-SoftDeletedMailbox allieb@contoso.com -WindowsLiveID allieb@contoso.com -Password (Read-Host "Enter password" -AsSecureString)Restore from the same source that deleted the user. Microsoft warns that a restore from another source fails.
How do You Copy Deleted Content Into an Active Mailbox?
Method #2: New-MailboxRestoreRequest (Free)
Use it when. You need the old content inside an active mailbox. Extra application. PowerShell.
Microsoft documents this route for a mailbox whose Microsoft Entra user was hard deleted. Create a target mailbox first.
- Find the deleted mailbox and copy its GUID.
- Find the GUID of the target mailbox.
- Create the restore request with both GUIDs.
- Monitor the request with Get-MailboxRestoreRequest.
Get-Mailbox -SoftDeletedMailbox | Select-Object Name,ExchangeGuid
Get-Mailbox -Identity <TargetMailbox> | Format-List ExchangeGuid
New-MailboxRestoreRequest -SourceMailbox <SoftDeletedMailboxGUID> -TargetMailbox <TargetMailboxGUID>
Get-MailboxRestoreRequestRead the full syntax on the Microsoft New-MailboxRestoreRequest reference page. The old guides add -AllowLegacyDNMismatch for a legacy address mismatch.
How do You Export the Restored Mailbox to PST?
Method #3: Purview Content Search (Free)
Who it suits. Admins with the eDiscovery Manager role. Extra application. None.
- Open the Microsoft Purview portal and create a new content search.
- Add the restored mailbox as the location and set no search conditions.
- Start the search and wait for the estimate.
- Select Export and choose One PST file for each mailbox.
- Download the results from the export page.
Microsoft describes the export in its article on exporting content search results. Mail from the archive mailbox lands in the same PST file.
Download the files before the Azure link expires. An expired link needs a new search.
Can a Tool Export the Mailbox to PST?
Method #4: SysTools Office 365 Export Tool (Paid)
Use it when. You want filters and a report. Extra application. Windows PC.
- Start the SysTools Office 365 Export software and tick Is Admin.
- Enter the Microsoft 365 credentials and select Sign In.
- Select the users and select Next.
- Choose Microsoft Outlook (PST) and set the split option.
- Select the categories Mails, Calendars, Tasks, Contacts and Archive Mailbox.
- Set a date filter, browse to a destination and select Start.
- Select Save Report when the export ends.
The software exports active mailboxes, so restore the mailbox before the export.
What Limits Apply to the Export?
- The 30 day window closes for good. A purged mailbox cannot return.
- A Litigation Hold or an eDiscovery hold on the mailbox blocks removal.
- A new Entra user with the same ExchangeGuid causes a validation conflict.
- A new licensed account with the same GUID hard deletes the old mailbox.
- Purview needs the eDiscovery Manager role.
- A PST file holds a copy and not the live mailbox.
Heads Up. Check the deletion date before you plan the work. Start the restore on day one and not on day 29.
Where Else do You Go From Here?
- Export an active mailbox with the guide to export an Office 365 mailbox to PST with PowerShell.
- Save active mailboxes with the guide to backup Office 365 to PST.
- Export a calendar with the guide to export an Office 365 calendar to PST.
Frequently Asked Questions
How Long does Exchange Online Retain Soft Deleted Mailboxes?
Exchange Online retains the mailbox for 30 days. After that the mailbox is purged and cannot be recovered.
Can You Export a Soft Deleted Mailbox Straight to PST?
No. Restore the mailbox first, then export it with Purview or an export tool.
Which Command Restores a Deleted Mailbox?
Undo-SoftDeletedMailbox restores the mailbox. New-MailboxRestoreRequest copies the content into another mailbox.
Why does the Old PowerShell Connection Fail?
Old guides use Basic authentication. Microsoft removed that sign in, so connect with Connect-ExchangeOnline.
Can Exchange Online Export a Mailbox With a Cmdlet?
No. Exchange Online has no mailbox export cmdlet. Use Purview content search.
What Role does a Purview Export Need?
The account needs the eDiscovery Manager role.
Does an Inactive Mailbox Follow the Same Steps?
No. An inactive mailbox is a different case and needs its own steps.
Author's Verdict
Restore the mailbox within 30 days and export the restored mailbox with Purview.
Use an export tool when you want filters, splits and a report.
Key Takeaways
- A deleted mailbox lives for 30 days.
- Restore first and export second.
- Connect with modern sign in and not Basic authentication.
Related Guides