Preparation
Before we can start importing you will need to assign the Mailbox Import Export role to the Global Admins in Exchange Online. Unfortunately, it can take up to 24 hours before this change is processed.
- Open the Exchange Admin Center, through https://admin.portal.com, and go to Permissions.
- In the admin roles select Organisation Management.
- Click on the plus to add a role
- Select the Mailbox Import Export role and click Ok
Now Microsoft says it can take up to 24 hours before the change is applied, but in my case, I could create a new Import Job after 5 min. Simply log-out, close all Microsoft tabs and log-in again.
Creating a New Import Job
So with the permissions set we can create a new Import Job. Go to https://protection.office.com and click on Information governance > import.
- Select Import PST Files
- Click on New Import Job
- Choose if you want to upload or ship your data. We are going to Upload it
On the summary page, we will find the SAS URL that we need later and a download link to the latest version of the Azure AzCopy tool. Download and install the Azure AzCopy tool and copy the SAS Url. Keep the SAS Url private because it gives you access to the Azure storage where all your PST files are uploaded.
You can leave the screen open or click Cancel and Continue later on.
Uploading the file with the Azure AzCopy Tool
After you have installed the Azure AzCopy tool you can open it. The tool is nothing more than a command-line tool to upload the files.
The upload tool will upload all the pst files in the source folder, it’s not possible to select a single pst file. So if you want to test it with one file, make sure you put it in a separate folder.
We are going to use the following command to upload the files.
AzCopy.exe /Source:"<Location of PST files>" /Dest:"<SAS URL>" /V:"<Log file location>" /Y
If your pst files are located in subfolders as well then you can use the /S switch
to specify the recursive mode.
Make sure you use quotes around the source and dest paths, otherwise you will get an error that the syntax is incorrect.
Depending on the size of the files it will take some time to upload the pst files.
Checking the uploaded PST Files (optional)
After the files are uploaded you might want to check it your self if all the pst files are uploaded to the Azure Storage. Download the Azure Storage Explorer and install it.
After you opened the Storage Explorer you will need to add an account.
- Click on Add an account…
- Select Use a shared access signature (SAS) URI
- Pass the SAS URI that we got from the import job
- Click Next and Connect
After you have verified the PST files you can close the Storage Explorer. Make sure you right-click the ingestiondata in the explorer and click Detach to disconnect. Otherwise, you will get an error the next time you want to open it.
Mapping the PST Files
The next step is to map the PST files to the mailbox in Office 365. You can use a CSV file this, a template for it can be downloaded here at Microsoft.
In the CSV file you will find a couple of columns/parameters:
- Workload – For pst import to the user’s mailbox, leave this on Exchange
- FilePath – If you only have pst file in the root folder, then you can leave this empty. If you have used subfolders, then enter here the name of the subfolder.
- Name – If the name of the pst file self
- Mailbox – The mailbox you want to import to
- IsArchive – You can import the pst file to the user’s online archive folder. Set it to true or false.
- TargetRootFolder – If you leave this blank, then the files will be imported to a new folder named Imported in the user’s mailbox. If you want to merge the data with the existing folders (like inbox and sent items) then use only a /
You can ignore the other fields, just leave them empty.
Completing the import job
After you have mapped all the pst files we can complete the import job. Go back to protection.office.com and open the import job.
- Select I’m done uploading my files and I have access to the mapping file
- Click Next and select the mapping file (csv file)
- Click on Validate to validate the csv file
- Click on Save when the validation is complete
Your new import job will be analyzed before you can actually start importing. Again, depending on the size this can be done a couple of minutes or longer. Just click refresh to check the status.
After the analyze is completed we can actually import the pst file into Office 365.
Click on ready to import to Office 365 to start the import. On the next screen, we will have to click again on Import to Office 365.
You can now filter the data, like only the mail from x years old or exclude all mail where the user is in the CC. When you are done filtering, or if you just want to import everything, simply click on Import data to start the import job.
The import job self may take some time, for this article, I used a 6mb pst file and even after 30 minutes the status was still on “import in progress”. The great thing is that you don’t have to wait on it, you can simply close the screen and check back later.