Network Upload PST Files – Microsoft Exchange Online
In this article, I will revise a previous blog post in which I discussed bulk uploading PST files into Exchange Online. You can find the old post here.
Hey there, it’s ThatLazyAdmin! Back at it with another tech tidbit for you. So, thinking of moving your old-school emails to Microsoft’s Exchange Online? Or maybe just archiving some emails? You’ll be dealing with PST files, those handy little containers Outlook uses for emails, calendars, and other mailbox goodies. Don’t fret; I’ve got you covered. Let’s dive into how you can upload these PST files to Exchange Online. Onward! 🚀📧
Download AzCopy – Here
The initial step involves downloading the AzCopy tool, a crucial utility used in the second step to upload PST files to Microsoft 365. Additionally, you must copy your organization’s SAS URL, a unique combination of your organization’s Azure Storage location network URL in the Microsoft cloud and a Shared Access Signature (SAS) key. This key grants the necessary permissions to upload PST files to an Azure Storage location. It is vital to protect the SAS URL as it is specific to your organization and will be used in the next step.
AzCopy is a command-line utility. After extracting the file, copy it to a directory that is easy to access. In my situation, I copied the file to C:\Softlib..
In the next step, you must create the SAS keys from the Microsoft 365 Purview Portal. These keys are essential for uploading the PST file.
- Go to > https://compliance.microsoft.com/ and log in with your Global Admin credentials.
- In the compliance portal’s left sidebar, navigate through Data lifecycle management > Microsoft 365 > Microsoft 365 > Import.
- In the Microsoft 365 section under Data lifecycle management, click on “Import”.
- If you are performing the import for the first time, you will encounter the following message on the Import page: “To create import jobs, you must be assigned the Mailbox Import Export role in Exchange Online.”
- Let’s go ahead and resolve the above message and assign the current user the needed permissions.
Navigate to Exchange Online Admin Centre: https://admin.exchange.microsoft.com/ > Role > Admin role.
On the Admin roles page, click on “Add role group”. Here, you will create a new Admin role specifically for the mailbox import and export functions.
Fill out the basic information for the new role and leave the write scope as the default setting. The click next.
In the ‘Add permissions’ section, use the search option on the right side, type “Mailbox Import Export,” select it, and then click next.
On the subsequent page, choose the admin to whom you want to assign the new role and then click next.
Review the new role group and then click ‘Add role group’ at the bottom of the page.
Having established the new role group, return to the compliance portal and select “Create Import Job.
Enter a name for the import job and then proceed by clicking next.
On the following screen, choose “Upload your data.” You’ll notice there’s also an option to send a drive to Microsoft’s physical location for the upload.
On the next screen, as previously mentioned in the post, you’ll have the capability to copy the SAS URLs. Additionally, there’s an option to download the Azure AZcopy tool from this page. However, considering we’ve already installed it as per the prerequisites section, you can skip that. Click on “Show network upload SAS URL” as this will be essential for the upcoming step.
With the SAS URL in hand, proceed to the Command Prompt. Once there, run the following command, ensuring you adhere to the given format:
If you have more than 1 pst file in the local then you need to add “/*” in the command as per below.
Azcopy.exe copy "PST File location/*" "SAS URL"
Make sure to replace “PST File location” with the path to your PST file and “SAS URL” with the URL you’ve obtained.
From the output below, it’s evident that the command executed successfully, and the files have been uploaded to the provided SAS URL.
How can you confirm that your files were uploaded correctly?
To ensure that all PST files have been uploaded correctly, you should download and use the Azure Storage Explorer tool.
Download Location: Microsoft Azure Storage Explorer tool
- Launch the Azure Storage explorer tool after installation.
- On the Select Resource page, Select Blob container
- On Select Connection Method, select “Shared access signatured URL (SAS)
- Provide a name for the connection and specify the SAS Url as per the below example.
- On the next page review the settings and click connect.
- In the Azure Storage Explorer, you’ll observe that the uploaded PST files are displayed.
Now that we have gone through the process of uploading the PST files using AzCopy and verified that all PST files have uploaded by using Azure Storage explorer, next we need to create PST mappings import file to associate the PST files to an active Exchange Online mailbox.
Once the PST files are uploaded to your organization’s Azure Storage, the subsequent step is to craft a CSV file designating the user mailboxes for PST import. This CSV will be used in the next phase to initiate a PST Import job.
The mappings file can be downloaded here “PST Import mapping file”
The mappings file will have the following columns:
In this instance, since the PST files were directly uploaded without a subfolder in the blob storage, no Filepath is specified. The “TargetRootFolder” suggests the PST content will go into a new folder named “ImportedPST”.
After finalizing the PST mapping file, return to the Import Job portal, check the two indicated boxes, and click next.
On the subsequent page, click on “+ Upload file” to select and upload the mapping file you’ve created.
After uploading the file, it’s essential to validate it. The “Validate” option will now be accessible; click on it to initiate the validation process.
After the validation concludes, the “Next” button will become clickable, and the imported file indicator will turn green.
You’ll be taken to the Review page, where after examining the details, you can click “Submit”.
After completing the upload, you’ll be presented with the subsequent page.
The duration of the import job can vary based on the size or number of files. Once it’s finished, you can check the status on the “Import Job” page within “Data lifecycle management.
As you can see below, data imported with completed.
When you select the import job, a window will pop up on the right, offering detailed information about each file and its import status, indicating success or failure.
And there you have it, fellow tech adventurers! 🚀 We’ve journeyed through the vast realms of Azure, battled the mighty PST dragons, and emerged victorious in the land of Exchange Online. Whether you’re a seasoned tech knight or a budding digital squire, always remember: every byte and bit have its place, and with the right map (or, in our case, tutorial), you can conquer any tech kingdom. Until our next quest, keep your code clean and your clouds fluffy. Happy importing! 🎉🏰🐉