How to export Office 365 mailboxes to PST using eDiscovery

[Update]: This post was updated on April 27, 2018.

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 Microsoft Edge. Mozilla Firefox or Google Chrome, works only 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. After logging in to your Office 365 portal, access the Microsoft 365 admin center as shown in the below image.Accessing Office 365 Admin Center
  2. In your Microsoft 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.
    How to export Office 365 mailboxes to pst
  4. In the eDiscovery Manager role group properties window, add your account to the eDiscovery Administrator list using the Edit button and following a simple creator.

    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 by clicking the Edit role group button.

    Choosing the eDiscovery Administrator

  5. Now go to Search & investigation > Content Search.
    How to export Office 365 mailboxes to pst - Content SearchImportant note: If you are missing the Content search option, 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 happens almost isntantly) the tool should work just fine. The issue with permissions might also result in the lack of the export/download option later on.
  6. In the new window, click New Search.
    How to export Office 365 mailboxes to pst - New Search
  7. This window has experienced a few layout updates since the introduction of eDiscovery searches. However, the way it functions is similar. The search window lets you specify which mailbox data you wish to export. Mind that ticking All locations will cause the tool to search through your SharePoint online and Public Folders database, which might take a longer while. If you want to export data from all mailboxes, select Specific locations and Modify.
    How to export Office 365 mailboxes to pst New Search - choose what to export
  8. In this window, choose Exchange email or select specific mailboxes using the Choose users, groups option. Additionally, you can enable exporting from SharePoint (again the whole database, or specific sites) and Public folders by checking the Exchange public folders option (in the Public folders section at the bottom of the window)

    How to export Office 365 mailboxes to pst Select location

  9. Apart from the location filter, the search option gives you several filtering options:
    • keywords/phrases (separated by logical operators: AND, OR, NEAR, NOT, etc.)
    • time ranges
    • From/To/CC/BCC fields
    • message types (which can be defined in the window that opens when you click the select message types… button).
    • and many more. You can check those options by clicking the Add conditions button in the search window.

    eDiscovery Export conditions

  10. If you want to export all mailbox data, just do not add any conditions or keywords. Click Save and run and you will be prompted to enter a name of the search and its description:
    Mailbox PST Backup via Office 365 eDiscovery - Name the new Search
  11. After clicking Save, the wizard will perform the search in the background. Now go back to the Content Search window, hit Refresh and choose your search.
    How to export Office 365 mailboxes to pst Select Search
  12. In the window that pops up, you can see if the search has been completed and the details concerning its result. Click More and Export results.How to export Office 365 mailboxes to pst export results
  13. In this window, 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. 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.
    When you are finished, click Export at the bottom of the window.
    How to export Office 365 mailboxes to pst export results 2
  14. The wizard starts to export data. Go to the Export tab and choose your search again to see its progress.How to export Office 365 mailboxes to pst export results 3
  15. You can either wait for the task to finish or click Download 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. Another important part of this window is the special export key. Remember to copy it, as it will be required in the ClickOnce application that will start in the next step
    Export Office 365 mailboxes to PST download results
  16.  A ClickOnce application called eDiscovery PST export tool will start. Paste the export key copied in the previous step. Next, point the Export tool to a folder where you want to save the PST files.
    Paste the export key and point to the download location

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

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


  1. wow thank you for the information
    And now I’m quitting Microsoft; everything is complicated for admins also they generate errors from every update I guess everyone departments want to hide sources or cooperate? Linux all the way now, I will not look back ever again.

  2. I’m going to guess that this is not going to work if the mailbox has In-Place or Litigation Hold enabled.

    • Hi Anthony,
      On the contrary, the primary reason to use the eDiscovery search tool is when mailboxes are on hold. In fact, the eDiscovery mechanism and the Search-Mailbox cmdlet are the only way to search through purged items (that is if there is the right retention policy or hold in place).

  3. When I click Export at step 13, I am getting this error:

    Parameter Scenario is not a valid URL option for cmdlet New-ComplianceSearchAction.
    Parameter name: parameter

    Any ideas?

    • Hi Brandon,
      This issue usually comes up when there is some kind of problem with permissions. In other words, either the permissions have not yet propagated throughout the tenant or were not assigned for the chosen account. First, make sure you have the required permissions (see step 4). You can also try adding yourself as an eDiscovery Manager (in addition to the Administrator). It should not take more than an hour for the permissions to start working. Also, signing out and in again might help.

    • There have been some changes concerning the layout of the eDiscovery function; however, its functionality has not changed. I am going to update the screenshots in the article later this week, stay tuned!

  4. Hi if you get error:
    Deployment and application do not have matching security zones.
    you need to install, ExtensionMeta4 ClickOnce Launcher in Chrome :
    https://chrome.google.com/webstore/search/clickonce%20for%20microsoft?hl=en

    ANd then it works as charm, gots this form MS support

    • Hi Linas,
      thank you for the contribution. Just to mention, this information is already included in the System requirements section above.

  5. Hi Adam,
    Thanks for the tip, has been really handy.
    We’ve ntoiced lately when we’ve used the eDiscovery tool to export user mailboxes, it is also including all files the user has access to in our SharePoint (Office365).
    Has anyone else had this issue and/or know the way to exclude SharePoint files/documents from the search/export?

    • Hello Nick,
      In the first step of configuring an eDiscovery search, you have the option to either Search all sites, or Choose specific sites to search. If you choose the latter and do not specify any sites, there should be no SharePoint files included in the export.

  6. 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.

  7. 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,

  8. 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).

  9. 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.

  10. 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.

  11. 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.

  12. 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.

  13. 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?

  14. 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 :)

  15. 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.

  16. 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.

  17. 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?

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

  19. 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.

  20. @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.

  21. 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

  22. 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>

*

*