Exchange OnlineHow-to

Restoring deleted email and mailboxes in Exchange Online: items, soft-deleted and inactive

Deleted email, a deleted user's mailbox and a leaver's mailbox on hold each need a different recovery method. Here's how to pick the right one, run it and confirm the data is back.

"It was deleted by mistake" can mean three different things in Exchange Online: email a user purged, a mailbox that disappeared with its user account, or a leaver's mailbox kept on hold. Each one has its own retention window and its own tool. In this post I'll match each case to the right method, walk through the commands and show how to confirm the data is back.

How this guide is organized: How it works → Prerequisites → Step-by-step → Verify → Tips & gotchasFlow diagram of the article's sections in reading order: 1. How it works. 2. Prerequisites. 3. Step-by-step (4 steps: Recover deleted items; Bring back a soft-deleted mailbox; License removed; Restore or recover an inactive mailbox). 4. Verify. 5. Tips & gotchas. Toolbox: Restore-RecoverableItems, New-MailboxRestoreRequest, Undo-SoftDeletedMailbox, Roles › Admin roles, Recipients › Mailboxes.1How it works2Prerequisites3Step-by-step4Verify5Tips & gotchas1Recover deleted items2Bring back a soft-deletedmailbox3License removed4Restore or recover aninactive mailboxTOOLBOXRestore-RecoverableItemsNew-MailboxRestoreRequestUndo-SoftDeletedMailboxRoles › Admin rolesRecipients › MailboxesHow this guide is organized: How it works → Prerequisites → Step-by-step → Verify → Tips & gotchasFlow diagram of the article's sections in reading order: 1. How it works. 2. Prerequisites. 3. Step-by-step (4 steps: Recover deleted items; Bring back a soft-deleted mailbox; License removed; Restore or recover an inactive mailbox). 4. Verify. 5. Tips & gotchas. Toolbox: Restore-RecoverableItems, New-MailboxRestoreRequest, Undo-SoftDeletedMailbox, Roles › Admin roles, Recipients › Mailboxes.1How it works2Prerequisites3Step-by-step1Recover deleted items2Bring back a soft-deleted mailbox3License removed4Restore or recover an inactive mailbox4Verify5Tips & gotchasTOOLBOXRestore-RecoverableItemsNew-MailboxRestoreRequestUndo-SoftDeletedMailboxRoles › Admin rolesRecipients › Mailboxes
At a glance: how this guide is organized · 4 steps · 5 key settings and tools

How it works#

Which recovery method fits what was deletedWhat was deleted? if Items in a mailbox: Were they purged or removed by a retention policy? if Yes: An admin recovers them (EAC or PowerShell, within the deleted item retention period.); if No: The user recovers them in Outlook (Recover deleted items from the Deleted Items folder.); if The user account: Was a hold or retention policy on it when the account was deleted? if Yes: Restore or recover the inactive mailbox (Restore copies content into a mailbox; recover makes a new one.); if No: Restore the user within 30 days (From Users › Deleted users in the admin center.); if Only the license: Assign the license again within 30 days (Content search can't search it while it's unlicensed.)What was deleted?Were they purged or removedby a retention policy?FIXAn adminrecovers themEAC or PowerShell,within the deleteditem retentionperiod.YesFIXThe user recoversthem in OutlookRecover deleteditems from theDeleted Items folder.NoItems in a mailboxWas a hold or retention policyon it when the account wasdeleted?FIXRestore orrecover theinactive mailboxRestore copiescontent into amailbox; recovermakes a new one.YesFIXRestore the userwithin 30 daysFrom Users › Deletedusers in the admincenter.NoThe user accountFIXAssign thelicense againwithin 30 daysContent search can'tsearch it while it'sunlicensed.Only the licenseWhich recovery method fits what was deletedWhat was deleted? if Items in a mailbox: Were they purged or removed by a retention policy? if Yes: An admin recovers them (EAC or PowerShell, within the deleted item retention period.); if No: The user recovers them in Outlook (Recover deleted items from the Deleted Items folder.); if The user account: Was a hold or retention policy on it when the account was deleted? if Yes: Restore or recover the inactive mailbox (Restore copies content into a mailbox; recover makes a new one.); if No: Restore the user within 30 days (From Users › Deleted users in the admin center.); if Only the license: Assign the license again within 30 days (Content search can't search it while it's unlicensed.)What was deleted?Items in a mailboxWere they purged or removed by aretention policy?YesFIXAn admin recovers themEAC or PowerShell, within the deleted itemretention period.NoFIXThe user recovers them in OutlookRecover deleted items from the Deleted Itemsfolder.The user accountWas a hold or retention policy on it whenthe account was deleted?YesFIXRestore or recover the inactive mailboxRestore copies content into a mailbox; recovermakes a new one.NoFIXRestore the user within 30 daysFrom Users › Deleted users in the admin center.Only the licenseFIXAssign the license again within 30 daysContent search can't search it while it's unlicensed.
Figure 1 · Decision tree Which recovery method fits what was deleted. Pick what was deleted, then answer one question to find the tool. Each case has its own window, so act before it runs out.
What was deletedRecoverable forTool
Items in a mailbox, including purged onesThe deleted item retention period (14 days by default, up to 30), or longer under a holdOutlook for users; EAC or Restore-RecoverableItems for admins
A mailbox whose user account was deleted (soft-deleted)30 daysRestore the user, Undo-SoftDeletedMailbox or New-MailboxRestoreRequest
A mailbox whose license was removed30-day grace periodAssign the license again
A mailbox on hold when its account was deleted (inactive)As long as the hold appliesNew-MailboxRestoreRequest, or recover it as a new mailbox

Single item recovery is on by default for new Exchange Online mailboxes. That means an admin can still recover items a user has purged until the deleted item retention period runs out. After that, unless a hold applies, the items are gone for good.

Prerequisites#

  • Exchange Online PowerShell (Connect-ExchangeOnline).
  • The Mailbox Import Export role for item recovery. No role group has it by default, so add it to one in the Exchange admin center under Roles › Admin roles.
  • A role that can restore users in the Microsoft 365 admin center, such as User Administrator.
  • Know which case you have. Get-Mailbox -SoftDeletedMailbox and Get-Mailbox -InactiveMailboxOnly show deleted and inactive mailboxes.

Step-by-step#

1. Recover deleted items#

Users can recover what's still in Recoverable Items themselves, with the recover deleted items option in their Deleted Items folder in Outlook or Outlook on the web. Purged items, and items removed by a retention policy, need an admin. In the EAC, go to Recipients › Mailboxes, select the mailbox, and under Others select Recover deleted items. Filter, select the messages and choose Recover deleted items. In PowerShell, search first and narrow until only the items you want are returned, then restore with the same filters:

PowerShell
Get-RecoverableItems -Identity laura@contoso.com -SubjectContains "Quarterly report" -FilterItemType IPM.Note `
    -FilterStartTime "9/1/2026 12:00:00 AM" -FilterEndTime "9/30/2026 11:59:59 PM"

Restore-RecoverableItems -Identity laura@contoso.com -SubjectContains "Quarterly report" -FilterItemType IPM.Note `
    -FilterStartTime "9/1/2026 12:00:00 AM" -FilterEndTime "9/30/2026 11:59:59 PM"

Restore-RecoverableItems accepts several mailboxes, and -MaxParallelSize controls how many it processes at once. To give users longer next time, run Set-Mailbox -RetainDeletedItemsFor 30.

2. Bring back a soft-deleted mailbox#

If the user account was deleted within the last 30 days, restore it in the Microsoft 365 admin center under Users › Deleted users. The mailbox comes back with it. Microsoft recommends restoring from the same place the deletion happened (Microsoft Entra ID or Exchange Online), because a restore from the other side fails. If the mailbox was removed with Remove-Mailbox:

PowerShell
Get-Mailbox -SoftDeletedMailbox | Format-Table Name, PrimarySmtpAddress, ExchangeGuid, WhenSoftDeleted

Undo-SoftDeletedMailbox allieb@contoso.com -WindowsLiveID allieb@contoso.com -Password (Read-Host "Enter password" -AsSecureString)

# Or copy the content into another mailbox (for example in hybrid, when the Entra user was hard-deleted)
New-MailboxRestoreRequest -SourceMailbox <SoftDeletedMailboxGuid> -TargetMailbox <TargetMailboxGuid>

Watch out: In hybrid, if a new user with the same ExchangeGuid or ArchiveGuid is synchronized from on-premises within those 30 days, you get an ExchangeGuid validation conflict. If that new account is licensed for Exchange Online, Microsoft documents that the original mailbox is hard-deleted.

3. License removed#

Exchange Online keeps the data for 30 days after the license is removed. Assign the license again within that time and the mailbox becomes fully active. While it's unlicensed, eDiscovery tools such as Content search can't search it.

4. Restore or recover an inactive mailbox#

A mailbox becomes inactive if a hold or retention policy covers it when the user account is deleted (see retention policies and litigation hold in Exchange Online). You have two options:

  • Restore copies the content into an existing mailbox. The inactive mailbox stays as it is. Use PowerShell; the EAC and the Microsoft Purview portal can't do this.
  • Recover converts the inactive mailbox into a new mailbox with a new user account, using New-Mailbox with the -InactiveMailbox parameter. After that, the inactive mailbox no longer exists.
PowerShell
Get-Mailbox -InactiveMailboxOnly |
    Format-List Name, PrimarySmtpAddress, DistinguishedName, ExchangeGuid, LegacyExchangeDN, ArchiveStatus

# Identify it by DistinguishedName or ExchangeGuid, not by SMTP address
$inactive = Get-Mailbox -InactiveMailboxOnly -Identity "<DistinguishedName or ExchangeGuid>"

# The restore checks LegacyExchangeDN, so add it to the target as an X500 address
Set-Mailbox -Identity manager@contoso.com -EmailAddresses @{Add="X500:$($inactive.LegacyExchangeDN)"}

New-MailboxRestoreRequest -SourceMailbox $inactive.DistinguishedName -TargetMailbox manager@contoso.com -TargetRootFolder "Inactive Mailbox"

# Archive to archive: add -SourceIsArchive and -TargetIsArchive

Without -TargetRootFolder, the items merge into the matching default folders of the target. Items in an old mailbox can be well past the target's retention settings, so Microsoft suggests turning on retention hold for the target first (Set-Mailbox -RetentionHoldEnabled $true).

Verify#

PowerShell
Get-MailboxRestoreRequest | Get-MailboxRestoreRequestStatistics | Format-Table Name, Status, PercentComplete

Get-MailboxRestoreRequestStatistics -Identity "<RequestIdentity>" -IncludeReport | Format-List Status, PercentComplete
  • Restore requests: good looks like Completed and 100 percent. After that you can remove the X500 address from the target if you like.
  • Item recovery: run Get-RecoverableItems again with the same filters. The restored items shouldn't appear any more, and the user should see them in the mailbox.
  • Soft-deleted mailbox: Get-Mailbox -Identity allieb@contoso.com returns the mailbox again, and the user can sign in to Outlook on the web.

Tips & gotchas#

  • The windows are hard limits. Once an account is deleted, only a hold or retention policy that was already in place keeps its mailbox beyond 30 days, so set that up for leavers before you delete anyone.
  • Auto-expanding archives. You can't recover or restore an inactive mailbox that has an auto-expanding archive. Microsoft points to Content search export, for eDiscovery purposes only. See auto-expanding archiving in Exchange Online.
  • Email data only. Restore and recover don't bring back application data stored in hidden mailbox folders.
  • Recoverable Items full? That's a quota problem rather than a recovery one. See "Mailbox full" in Exchange Online.
  • For Exchange Server, see recovering a deleted mailbox in Exchange Server.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

M365 Subject Matter Expert, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)