How to export Office 365 mailboxes to PST using eDiscovery

[Update]: This post was updated on July 05, 2017.

In this article, I am going to show you how to export Office 365 mailboxes to PST files using an Office 365’s native in-place eDiscovery mechanism as a workaround.

The reason why you may need to use it is that Microsoft doesn’t provide any tools dedicated specifically for this purpose (like the New-MailboxExportRequest cmdlet in on-premises Exchange). In fact, if you want to export mailboxes to PST files to e.g. add a layer of extra protection to your Office 365 data or migrate away from Office 365, the eDiscovery mechanism is your only option, other than opening the mailboxes in Outlook and using its Import/Export functionality.

IMPORTANT: eDiscovery is supported in all Exchange Online plans and in selected Office 365 plans. For more see this TechNet article.

Note that this solution can also be used in Exchange 2016 and 2013.

System requirements:

  • 32 and 64-bit versions of Windows 7 and later versions
  • Microsoft .NET Framework 4.5
  • Internet Explorer 10 and later versions, or Mozilla Firefox or Google Chrome, with the ClickOnce add-in installed

As already mentioned, this is a workaround, so most of the below steps are going to be related to setting up in-place eDiscovery. The PST export comes at the end (it is performed via a ClickOnce application).

Steps to export Office 365 mailboxes to PST using eDiscovery

  1. In the Office 365 Admin center after logging in to your Office 365 portal, access the Security & Compliance Center as shown in the below image.Accessing Office 365 Admin Center
  2. In your Office 365 admin center, expand Admin centers and click Security & Compliance.
    Access Office 365 Security & Compliance Center
  3. In your Security & Compliance center, go to Permissions and edit eDiscovery Manager role group.
    This and the next step are necessary because you need to be a member of the eDiscovery Manager role group to be able to use eDiscovery features.
    Set Permissions to Export Mailboxes to Office 365
  4. In the eDiscovery Manager role group properties window, add your account to the eDiscovery Administrator list using the plus button and click Save.

    The role group normally has the following roles assigned: Case Management, Compliance Search, Export, Hold, Preview, Review and RMS Decrypt. In some cases, the Export role is missing. If that is the case, make sure you add it using the plus button.

    Setting Permissions to eDiscovery Management

  5. Now go to Search & investigation, click the plus button to start a new Content Search wizard, type in a name and click Next.
    Create New Content Search in Office 365 eDiscoveryImportant note: If you are missing the + button, it is most likely related to the eDiscovery permissions you set in the previous steps. Changes in the eDiscovery permissions might take even up to 24 hours to apply. 24 hours after you set the permissions (or less, in my case it was around an hour) the tool should work just fine. The issue with permissions might also result in the lack of the download button in step 9.
  6. If you want to export data from all mailboxes, select Search everywhere and tick Exchange.

    Or select specific mailboxes using the Custom location selection option, and then clicking the plus button. This will open a new window – highlight the mailboxes and/or SharePoint sites you want to export data from, click add -> and OK.

    Additionally, you can enable exporting from Public folders by checking the Search all public folders option (in the Public folders section at the bottom of the window)

    Choose Office 365 mailboxes to export to PST

  7. The next step gives you several filtering options (unless you want to export all data, in which case do not change anything):
    • keywords/phrases (separated by logical operators: AND, OR, NEAR, NOT, etc.)
    • time ranges
    • From/To/CC/BCC fields
    • and message types (which can be defined in the window that opens when you click the select message types… button).

    eDiscovery Search - Specify keywords and conditions

  8. After clicking Search, the wizard will perform the search in the background. When it finishes click Start export.
    Export Office 365 Mailboxes to PST files
  9. In the window that pops up, you can choose if you want to include encrypted files. You can also decide how to export the Exchange content. I find the default options to be the most reasonable for a backup – each mailbox has a separate PST file, which makes recovery a bit easier if necessary. When you are finished, click Start export on the bottom of the window.How to Export Office 365 Mailboxes to PST
  10. The wizard starts to export data. You can either wait for it to finish, or click Download exported results right away. If you start to download the results before the export is completed, the download and export tools should finish at the same time.Download exported results
  11. In this window, a special export key is generated. Remember to copy it, as it will be required in the ClickOnce application that will start in the next step.Copy the export key to clipboard
  12.  A ClickOnce application called eDiscovery PST export tool will start. Paste the export key copied in the previous step. Next, point it the Export tool to a folder where you want to save the PST files.
    Paste the export key and point to the download location
    Do not check the Enable deduplication option, unless you want the search results to be exported to a single PST file.For more on unsearchable items see this TechNet article.

After you click Start, the tool will begin the export. When it completes, close the application.


Back up Office 365 with CodeTwo Backup for Office 365


After performing the export, you can delete the eDiscovery search from the Content Search window by highlighting it and clicking the trash button.

Export Office 365 mailboxes to PST using CodeTwo Backup for Office 365

If you are looking for an easier and faster way of creating PST files that playing with an eDiscovery search and export, you can use a third party solution like CodeTwo Backup for Office 365. The program comes with the intuitive console, where you can first back up your mailbox data to local storages, and then archive it to PST files.

Archive to PST

As the program has the built-in Scheduler, you can easily automate the archiving process. This way the archive job will start on its own at the scheduled time.

Scheduler option

The program comes with a trial so you can download a free version of CodeTwo Backup for Office 365 and test it directly in your environment. The trial version gives you actually the same feeling as the full version with only two limitations – it works 30 days and allows to restore up to 5 items per folder (if you would like to test the restore feature as well).

All in all, using PST files as the backup method is rather a bad idea. Their proneness to corruption, low to none item-search effectiveness, and poor management options make this method rather unsafe and hazardous for backup or migration purposes.

Suggested reading

48 thoughts on “How to export Office 365 mailboxes to PST using eDiscovery


  1. Thanks for the very informative write-up. My organization is currently in a hybrid mode. We’ve already moved all the archive mailboxes from Exchange on-prem to Office 365. The primary mailboxes are still on-prem while we resolve certain issues with vertical applications, etc. Archive mailboxes are not enumerated when there is no associated primary mailbox so there doesn’t seem to be any means to export an archive mailbox in that situation except to connect Outlook to the mailbox and export the PST. Does anybody know of some other means to export an archive mailbox when the primary mailbox is on-prem?

    • Hi Jonathan,
      Migration from Office 365 to an on-prem Exchange or to PST files is quite problematic – the only way to do this natively is eDiscovery or manual export. The only dependable way to export mailboxes (and archives) from Office 365 is using a third party tool, like CodeTwo Office 365 Migration.

  2. Hello,

    I have a problem.
    I can export to PST file using ediscover tool, but my PST file is a mirror of my office365 account.

    How I can export email for a PST file and automatic delete email on the source?
    thanks,

  3. Does the pst export / file also includes contacts and calendar informations? Or is this only a mailbox / e-amil export? Thanks for your support.

    • By default, the pst file includes all message types: emails, calendars, contacts, etc. You can use filters and conditions to export only emails or to exclude some message types if you like (see Step 7 of the guide above).

  4. This trick was extremely helpful! Although I noticed that it now has a limited lifespan. Microsoft has this notice on the Compliance Management screen:

    Starting July 1, 2017, you won’t be able to use the EAC to create searches in Exchange Online. Please start using Content Search in the Security & Compliance Center. In Exchange hybrid deployments, searches run from your on-premises organization aren’t affected by this change. Learn more about content search.

    Will there be another method or is Microsoft just shutting down this workaround?

    • Yes, I got this same message. However I was able to export a mailbox by going to the Security and Compliance Center and adjusting the permissions in line with the above (There are similar options). Then go to Search and Investigation -> eDiscovery. Create a case (“PST Export”). Open that case using the button to the left of the line and then click on the Search Tab. From here you can define the search similarly to the steps above. Once the results of the search have finalised, click on the export button as found in step 9 above. The result can then be found in the Export tab where you can Download exported results from the hyperlink on the right panel. The only additional step is to copy the Export Key to the clipboard to then paste back into the ClickOnce Export Tool. Essentially, given the information above and performing similar operations through the Security & Compliance Admin Console, you can achieve the same result.

    • Thank you for such a detailed description! That is right, the functionality is not blocked, it is just moved to the Security and Compliance Center. I will update the article before it is outdated, so that it gives a detailed step-by-step walkthrough of the new method (like Jonathan wrote, it is not that different, anyway).
      In the meantime, you can watch the video guide on how to export Office 365 mailboxes to PST files – it shows how it is done using the new method.

  5. Hi! First, thank you so much for the trick, it’s been most helpful!!

    Now, the question: Do you think could be a way to use this same workaround for the public folders?
    I would like to extract a pst for each public folder we have (ideally, in batchs, but if I had to do it manually for each folder it doesnt matter).
    I have already tried mail-enabling the public folder, but you can only browse for user mailboxes.
    Thanks again!

    • Hi Jose,
      Yes, you can use eDiscovery to back up public folders.
      Just make sure you check out Search all public folders in step 6. You cannot limit your search to a specific public folder, but you can use certain keywords to limit your search. As far as I know, public folders do not have to be mail-enabled for eDiscovery to find them.

  6. It’s worth to mention that when you start importing the PST via the export tool it asks for authentication. If your Office 365 account it MFA (two factor authentication) enabled, you have to create an app password in order to authenticate. The PST tool doesn’t support ADAL libraries.

    • Hi Tim,
      Please make sure you have completed the step 4 and that your account has the Mailbox Import Export role assigned. In my case, it took about half an hour before the changes were applied. Sometimes, logging out and in the tenant again might help. If the icon is not there after a considerable amount of time, you might want to consider raising a support ticket with Microsoft.

  7. Hi,

    I’ve been trying to follow you guide but I’m stuck on step 4 : the + button for adding roles in discovery management is non existant on my admin console.
    Am i missing something ?

    • Hi Thomas,
      If you cannot add new roles to Discovery Management Role Group, please try creating a new Role Group. Then add the three Roles mentioned in step 4 to the new Role Group and continue with the article accordingly. You can also use PowerShell, just consult the Note below the step 4.

  8. Hi Adam,

    I am recieving this error below:

    Following errors were detected during this operation.
    * [10/30/2016 11:01:59 PM] System.Deployment.Application.InvalidDeploymentException (Zone)
    – Deployment and application do not have matching security zones.
    – Source: System.Deployment
    – Stack trace:
    at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
    at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
    at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
    at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
    at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

    I am not exactly sure what I am seeing here. Have you seen this before?

    • Hi Jeff, Do I assume correctly that this happens when you try to run the PST export tool in Step 10? What browser are you using?

  9. Thumbs up for Stephens information.
    I was running it on chrome and it didnt work.
    I read this and moved over to Edge and BAM! It worked.

    Thanks :)

  10. The ediscovery tool or compliance center is NOT going to work if you have a large amount of data to export. For example, there is a 250GB download limit. In our organization, that is enough for less than one week of data.

    The export tool is terrible, if you have a large organization, searches are very buggy and take 30 minutes per search. Because the tool is so bad, we are trying to go to another archiving system. Guess what, using this same buggy tool is the solution we are given to export, and even a 100GB export will not work or have a ton of errors. That’s two weeks. We are down to trying to export one day. Tons of errors for 100GB.

    Do NOT listen when Microsoft says this will replace your current archiving system. It is a scam.

  11. MAKE SURE TO RUN THIS IN INTERNET EXPLORER. I SPENT AN HOUR ON THE PHONE WITH MICROSOFT BECAUSE THE PROGRAM THAT RUNS WHEN YOU CLICK THE DOWNLOAD WOULDN’T WORK WITH MOZILLA FIREFOX.
    P.S. Microsoft was useless.
    P.P.S. Godaddy was super helpful even though it wasn’t their problem.
    Good day! :)

    • Thats a great tip Stephen, thanks a lot.

      Was wondering why it wont work on Chrome, then read your comment.!!

    • Seriously? Make sure you blame Microsoft when you’re incapable of using Google. It took me <5 seconds to Google it and figure out that you can, indeed, use Google to export PST by using a ClickOnce Chrome extension.

  12. thanks Adam, works a treat however the mailbox I exported is massive so it split it into multiple 10Gig pst files.

    Is there a way to consolidate them all into one PST?

  13. In my account I cannot complete Step 4 because there is no plus and minus buttons to add new Roles. What should I do?

  14. I was able to successfully export using an administrative account that had no mailbox or license. I did have to log off and back on after adding the permissions to the account for the export option to appear. I also did have to add the “Mailbox Import Export” permission to the Discovery Management Role manually.

  15. @Adam; the account you use to do the export alse needs to have an active mailbox. If this is an administrator account without an active mailbox temporarily assign a license to this account.

  16. Thanks “Adam the 32-bit Aardvark”! I really appreciate you posting this!

    One minor comment: I was not able to add the Mailbox Import Export role but found that if i ticked the box to “Search All Public folders” when creating the eDiscovery it then let me do the save to PST option anyway.

    If i did not check the box for “Search All Public folders” the download button (arrow) would not show up.

    • Hi Jason,

      Did you get any errors when you tried to add the Mailbox Import Export role?

      Best regards,
      Adam

  17. It takes some time for the system to update with a new role. It also helps to log out and completely close the browser.

    At the ClickOnce application step it did not work in Chrome but the obvious solution is to open it from Internet Explorer.

    Thanks so much for these detailed instructions!

    • Hi David,

      In step 4, please check if all 3 roles I talk about are included.

      Best regards,
      Adam

    • I have the same problem, no Download link/symbol is showing. YES I ensured all 3 roles are checked in Step 4 also… Tips?

    • Hey David,

      I had this same issue while i was logged in as the admin.
      I couldn’t even add the admin to the member list in step 4.

      Not sure if this is the solution, but this was a workaround that i did.
      I created a new user and temporarily assigned it a license.
      Gave that user admin rights and then added him to the list in step 4.

      Afterwards, i signed out of my admin account and signed in with the new user i created. Went to that Ediscovery screen and now i was able to see the Download button. Oh, and DONT FORGET to run this on IE. It doesnt work on chrome as Stephen explained.

    • I had this same issue while i was logged in as the admin.
      I couldn’t even add the admin to the member list in step 4.

      Hi Erwn,

      Can you provide more details on how this issue manifested itself?

      Best regards,
      Adam

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

*