Restore e-mails in ExchangeOnline without use of PST files
According to the official documentation in Microsoft, you can recover emails in Exchange Online by creating an eDiscovery search query and then exporting the emails to a .PST file.
However, this has a disadvantage that downloading and uploading a .PST file can causes a overloaded internet connection and the PST file can be intercepted by unauthorized users.
To prevent this, I found a way to make e-mails in Exchange Online available via Outlook web. So the e-mails can be copied from the DiscoveryMailbox directly to the UserMailbox.
These steps are in addition to Microsoft’s documentation below:
https://docs.microsoft.com/en-us/microsoft-365/enterprise/recover-deleted-items-in-a-mailbox?view=o365-worldwide
To make sure that the e-mails can be restored in Outlook web, first you have to start a search using a DiscoverySearch in Exchange admin center. Then, with the additional steps, you can grant rights to the DiscoveryMailbox to restore emails to the relevant user mailbox.
To perform a DiscoverySearch, first follow the steps in the link below:
https://docs.microsoft.com/en-us/microsoft-365/enterprise/recover-deleted-items-in-a-mailbox?view=o365-worldwide
As soon as the DiscoverySearch is ready and you can open the DiscoveryMailbox (like picture), follow the steps below to assign rights to the relevant mailbox.
Start Exchange shell and download the ExchangeOnline module
Import-Module ExchangeOnlineManagement
Run this command to connect to Exchange Online:
Connect-ExchangeOnline
Copy the name of the Discovery mailbox or if it is not known, look it up using the following command:
Get-Mailbox *discovery*
Enter following command to grant permissions to DiscoveryMailbox and configure Automapping
As a example we use “DiscoverySearchMailbox{D919BA05-46A6-415f-80AD-7E09334BB852}@contoso.com”
Add-MailboxPermission -Identity "DiscoverySearchMailbox{D919BA05-46A6-415f-80AD-7E09334BB852}@contoso.com" -User "userMailbox" -AccessRights FullAccess -InheritanceType All -AutoMapping $true
From now on you can copy e-mails from the DiscoveryMailbox to UserMailbox in Outlook web
Leave a Reply
Want to join the discussion?Feel free to contribute!