When a user leaves an organisation in Microsoft 365, administrators have several options for how to handle the user’s mailbox. The approach chosen determines how long the mailbox data is retained and how it can be recovered in the future.
Option 1: Convert the mailbox to a Shared Mailbox
A common approach is to convert the user mailbox to a Shared Mailbox.
The process is typically:
When this is done:
This approach is useful when the mailbox needs to remain accessible for operational reasons.
If the user account is deleted from Microsoft Entra ID, the associated mailbox enters a soft-deleted state.
When a user is deleted:
Restoration is straightforward:
When this occurs:
If the user is not restored within 30 days, the user account and mailbox are permanently deleted by default.
If a mailbox is subject to a Retention Policy, Retention Hold, or Litigation Hold when the user account is deleted, the mailbox is not permanently deleted after 30 days.
Instead, it becomes an Inactive Mailbox.
Inactive mailboxes:
Administrators can search inactive mailboxes and export data, for example:
Inactive mailboxes can be restored using New-MailboxRestoreRequest.
There are two common restore scenarios.
The most common method is to restore the contents of the inactive mailbox to another mailbox.
Typical process:
Examples:
Get inactive primary mailbox
Get-Mailbox joe.bloggs -InactiveMailboxOnly | FL IsInactiveMailbox,Name,Identity,PrimarySmtpAddress,UserPrincipalName,WindowsEmailAddress,MicrosoftOnlineServicesID,ExchangeGuid,ArchiveGuid
Get inactive archive mailbox
Get-Mailbox joe.bloggs -InactiveMailboxOnly -Archive | FL IsInactiveMailbox,Name,Identity,PrimarySmtpAddress,UserPrincipalName,WindowsEmailAddress,MicrosoftOnlineServicesID,ExchangeGuid,ArchiveGuid
Restore primary inactive mailbox example
New-MailboxRestoreRequest -SourceMailbox [Source ExchangeGuid] -TargetMailbox restoreto.user@domain.com -AllowLegacyDNMismatch
This restores:
To restore the archive mailbox you must run an additional restore request.
Restore inactive archive mailbox example:
New-MailboxRestoreRequest -SourceMailbox [Source ExchangeGuid] -SourceIsArchive -TargetMailbox restoreto.user@domain.com -TargetIsArchive -AllowLegacyDNMismatch
Important Note: If the target mailbox does not have an archive enabled, the archive content cannot be restored until the archive mailbox is enabled.
A restore request can also be used to restore the contents of the inactive mailbox into a new mailbox associated with a newly created user account.
In this scenario the administrator typically:
Important behaviour to understand:
During the restore process:
However, the original message metadata remains intact, including:
This ensures the restored messages remain consistent with their original transport history.
When restoring an inactive mailbox that has an archive:
In this case:
Get-MailboxRestoreRequest | Get-MailboxRestoreRequestStatistics
Inactive mailboxes provide a powerful mechanism for retaining and recovering mailbox data after a user leaves the organisation.
Unlike soft-deleted mailboxes, which are removed after 30 days, inactive mailboxes remain preserved for the duration of the organisation’s retention policies and can be searched or restored when needed.
Understanding the differences between soft-deleted, shared, and inactive mailboxes is critical for designing effective data retention and recovery strategies in Exchange Online.
The restore operation does not modify the inactive mailbox. The data is copied to the destination mailbox while the inactive mailbox remains preserved for retention and eDiscovery purposes.
During a recent project we were asked to migrate active mailboxes and “leavers”.
The leavers were not terminated users that had been converted to shared mailboxes as we had assumed, but instead were Inactive Mailboxes (beyond 30 days) held under retention policies. This required us to restore those mailboxes before they could be migrated.
During the migration project some active users also became terminated. After 30 days their mailboxes transitioned to an Inactive Mailbox state, meaning they also moved into the inactive mailbox migration batches.
The migration tooling had already processed those users while they were active mailboxes. When we restarted migrations using the existing migration records we observed that nearly all mailbox data was migrated again and duplicated.
What had happened was:
Because the restored mailbox had a different ExchangeGUID and different internal item identifiers, the migration tools treated the content as new items, resulting in duplication.
Fortunately, we detected this early and were able to remediate the issue by running fresh migrations targeting only the restored mailbox contents.
Final Tip:
If a mailbox is still within the 30-day soft-delete window, always restore the user account and re-licence rather than performing a mailbox restore. This reconnects the original mailbox and preserves the ExchangeGUID, avoiding duplicate data during migrations.