Update 06/11/2015: We have now disabled the old method of recovering a mailbox (which involved using Get-RemovedMailbox and New-Mailbox –RemovedMailbox) and we no longer support the recovery of hard deleted mailboxes.
The process of recovering deleted users or mailboxes in a hybrid or cloud-only organization can be frustrating. When dealing with these scenarios, customers would sometimes end up with multiple mailboxes for a single user, find that some emails are missing, or even lose data associated with other services. Often, they would find those situations difficult to troubleshoot and they would call Microsoft support for help.
For a long time now, Exchange Online has had a capability called "soft delete" that allows a user to recover a mailbox with very little effort. Let’s take a look at how a mailbox recovery should be approached.
Scenario: User Is Accidentally Deleted Along with Their Mailbox
First, you need to know if the deleted user was managed on-premises or in the cloud.
If the user was managed in the cloud:
If the source of authority for the user is in the cloud (meaning they are not sync’d from on-premises Active Directory), you can restore the user from the Admin Portal at http://portal.office.com. Navigate to Users, and select Deleted Users. There you will see the option to restore the user.
If user was synchronized from on-premises AD:
If the user account was being synchronized from on-premises you should restore the user on-premises. The mailbox will automatically reconnect.
IMPORTANT NOTE: Recreating the user on-premises will not have the same effect because the Globally Unique Identifier (GUID) used in the recovery process would be different.
The proper way to restore a deleted user is documented at http://support.microsoft.com/kb/2619308. That’s it! There is no need to take any additional actions.
What If These Actions Do Not Work?
There could still be times when "soft recovery" actions will not fix the user's account. For instance, the user may have a corrupt account or the account may have been permanently deleted. Another possibility is that the user is no longer with the company, but the mailbox is used as a job-related mailbox and needs to be available to a new user.
For these scenarios we have the New-MailboxRestoreRequest cmdlet. This allows you to merge the data from one user or archive mailbox to another user, or you can archive the active mailbox. Unlike the recovery process above (which is the best approach), New-MailboxRestoreRequest allows you to merge the data from a soft-deleted mailbox into an alternate active mailbox or archive mailbox.
Why Is This a Benefit?
Previously, if you could not recover both the user and the mailbox, you would have to perform an unsupported process of hard-deleting a mailbox. This process was unreliable and sometimes caused a ripple effect on other services such as SharePoint and Lync. If the process failed, you were left with very limited options, and ultimately had to call support.
What Do I Need To Do To Take Advantage of This New Option?
All you need to do is create a new user with a mailbox and merge the data. The way you create the user with a new mailbox will depend on if you use DirSync or the Microsoft Online Portal to create users.
1. Create the user and Mailbox.
- Create the user and remote mailbox from the on-premises Exchange management tools.
- Force a directory synchronization.
Not Using DirSync:
- Log into http://portal.office.com.
- Create and license the user.
2. Run the cmdlet to merge the accounts. This is done from PowerShell connected to Exchange Online.
A) Connect PowerShell to Exchange Online. To do this, see http://technet.microsoft.com/en-us/library/jj984289(v=exchg.150).aspx
B) Run the following Command and retrieve the GUID for the soft-deleted mailbox that you want to restore: Get-Mailbox -SoftDeletedMailbox
C) Run a cmdlet similar to the following to restore the mailbox: New-MailboxRestoreRequest -SourceMailbox <GUID from Step 2B> -TargetMailbox <GUID from Step 1>
NOTE 1: If the mailbox source and/or target is an archive, use the following switches (-SourceIsArchive and/or -TargetIsArchive)
NOTE 2: The value in Step 2C calls for the account GUIDs, but they can take other values such as an SMTP address or a UPN. The reason we recommend using GUIDs is to reduce the chances that there will be any confusion or conflict between the source and destination.
Are there limitations?
This merge capability does have some limitations. For instance, you cannot merge data from a source mailbox that is active. Let’s say you have a user (Jane) who is still licensed and using her mail. You would be unable to merge her data into Tom’s mailbox with this new approach. This new process is not meant to be used for backup and duplication purposes; this is a recovery tool only.
Another time when this tool will not work is when the mailbox is hard-deleted. If you manually remove a user account in Office 365, and then remove the user from the Recycle Bin, the mailbox would be hard-deleted. This is the potentially damaging scenario that was briefly discussed above. Again, this merge approach is for recovering soft-deleted mailboxes when the normal recovery options are not available to you.
NOTE: Unless you place the mailbox on litigation or in-place hold prior to hard-deleting the user account, there is no recovery method available to you from Exchange Online to restore the mailbox or its contents. If you place the mailbox on hold first, it will be flagged as an inactive mailbox and the New-MailboxRestoreRequest CMDlet will be available to you. For more information on inactive mailboxes see: Manage inactive mailboxes in Exchange Online.