How to Import PST Files into Microsoft 365: Step-by-Step Guide
Importing PST files into Office 365 seems complicated. However, you’ll have everything up and running smoothly with this easy-to-follow guide.
Preparing the Archive Mailbox:
Assign necessary licenses & Enable archive Mailbox:
1. Assign the Mailbox Import Export Role
To import PST files, you first need permission. Without it, you won’t be able to complete the process. Follow these steps to assign the correct role:
- Sign in to Exchange Admin Center.
- Expand Roles and click on Admin roles.
- Select Organization Management.
- Click on the tab Permissions.
- Select Mailbox Import Export role.
- Click Save.
Key Point: The change takes up to 24 hours to take effect. However, in most cases, it will be active within 1 hour. You can verify your permissions later by trying to access the Import section. If you don’t have access, the role not have been applied yet.
2. Create a New PST Import Job
Once you have the necessary permissions, you can create an import job. Here’s how:
- Sign in to Microsoft Purview compliance portal.
- Expand Data lifecycle management and click on Microsoft 365.
- Choose Import.
- Click on New Import Job.
- Click on + New import job. Give your job a clear and descriptive name (e.g., “PST Import-Department”).
- You can follow the on-screen instructions to set up the job. Microsoft 365 will guide you through the initial process. It will ask you if you want to upload the PST files.
Note: We have enabled the above-highlighted notification in Assign the Mailbox Import Export Role
Note:
Copy the SAS URL to your clipboard. It will be useful for viewing the uploaded PST in Microsoft Storage Explorer. Do not close the current SAS URL window. Otherwise, you will need to generate another SAS URL to upload the PST to the blob storage. There is no limitation on creating SAS URLs.
An SAS URL is a secure HTTPS connection. It ensures the safety of our data. This is important when uploading files directly to Azure blob storage.
3. Upload Your PST Files to Microsoft 365’s Azure Storage
Microsoft 365 uses Azure Storage to hold your PST files before importing them into mailboxes. Here’s how to upload your files to Azure:
- Download AZ Copy (Microsoft) and place it in the folder.
- Use the source directory on the shared drive \\SERVER\PST or local drive (D:\PST).
- Start Command Prompt as an administrator.
- Change the directory to C:\Temp.
- Paste the SAS URL you copied in the previous step into the command.
- Run the command to copy the PST file to Azure.
TIP:
If your PST files are located in D:\PST_Files and the SAS URL provided by Microsoft 365 is https://example.sasurl.com, your command would look like this:
azcopy.exe copy "<Source location of PST files>" "<SAS URL>"
Note:
In the article, I used a network share as an example. I encountered a minor issue while running the command. You need to add the --recursive option, as recommended by Microsoft.
You can use network share or local drive to upload your PST to Azure Blob Storage.
Tip: Always check the log file after the upload is finished to ensure there were no errors.
4. Verify the PST Files Have Been Uploaded Successfully
Once your files are uploaded, you can confirm the upload status:
- Download and install the Azure Storage Explorer – cloud storage management | Microsoft Azure
- Launch Microsoft Azure Storage Explorer.
- Right-click on Storage Accounts.
- Select Connect to Azure Storage.
- Choose Blob container.
- Enter a Display name.
- Paste the Blob container SAS URL obtained from the previous step.
- Click Connect.
- The PSTs folder and the PST file will now be visible.
Note: I successfully connected to the blob storage using the SAS URL. Since I have not uploaded any PST files to the blob storage yet, it is currently showing as data unavailable.
Tip:
Azure Storage Explorer cannot be used to upload or modify PST files. The only supported method for importing PST files is via AzCopy. Additionally, you cannot delete PST files once they are uploaded to the Azure blob. Attempting to delete a PST file will result in a permissions error.
If the files are not listed immediately, give it some time to refresh. You can also manually refresh the page to speed up the process.
5. Create a PST Import Mapping File
The PST mapping file tells Microsoft 365 which mailbox each PST file should be imported into and where. Here’s how to set it up:
- Download a copy of the PST import mapping file from either the direct link or Microsoft.
- Open Microsoft Excel.
- Navigate to the advanced options in Excel and make the following changes:
- Uncheck the “Use system separators” option.
- Set the Decimal separator to a period (.)
- Set the Thousands separator to a comma (,)
- Open the CSV file with Microsoft Excel and edit the values.
- You can open the CSV file with Notepad to edit the values. You can also verify that it is saved as a comma-delimited file.
- Microsoft Recommendation Mapping PST,
- FilePath: The path to your PST file in Azure. This is provided in the Import job after uploading the files.
- Mailbox: The email address of the Office 365 mailbox where the PST should be imported.
- IsArchive: Set this to TRUE if you want the PST imported into the mailbox’s archive. Set it to FALSE to import it into the primary mailbox.
- TargetRootFolder: If you want the PST to go into a specific folder (e.g., a folder called “Imported Emails”), specify that here. Leave it blank to import everything to the mailbox’s root folder.
- Save your changes once you’ve filled out the file.
Note: For point number 3, you encounter issues during the PST mapping file validation. If you do, you can try adjusting the settings. However, it is safe to leave the settings as they are. Nowadays, this error is not commonly seen.
Workload | Specifies the service that data will be imported to. To import PST files to user mailboxes, use Exchange . | Exchange |
FilePath | Specifies the folder location in the Azure Storage location that you uploaded the PST files to in Step 2. You should leave this parameter blank in the CSV file. This applies if you didn’t include an optional subfolder name in the SAS URL in the /Dest: parameter in Step 2. You didn’t include an optional subfolder name in the SAS URL. If you included a subfolder name, specify it in this parameter (see the second example). The value for this parameter is case-sensitive.Either way, don’t include “ingestiondata” in the value for the FilePath parameter.Important: The case for the file path name must be the same as the case you used if you included an optional subfolder name in the SAS URL in the destination field in Step 2. For example, if you used PSTFiles for the subfolder name in Step 2 and then use pstfiles in the FilePath parameter in CSV file, the import for the PST file will fail. Be sure to use the same case in both instances. | (leave blank) Or PSTFiles |
Name | Specifies the name of the PST file that will be imported to the user mailbox. The value for this parameter is case-sensitive. The file name of each PST file in the mapping file for an import job must be unique. Important: The case for the PST file name in the CSV file must be the same as the PST file that was uploaded to the Azure Storage location in Step 2. For example, if you use annb.pst in the Name parameter in the CSV file, but the name of the actual PST file is AnnB.pst , the import for that PST file will fail. Be sure that the name of the PST in the CSV file uses the same case as the actual PST file. | annb.pst |
Mailbox | Specifies the email address of the mailbox that the PST file will be imported to. You can’t specify a public folder or unified group because the PST Import Service doesn’t support importing PST files or unified groups to public folders. To import a PST file to an inactive mailbox, you have to specify the mailbox GUID for this parameter. To obtain this GUID, run the following PowerShell command in Exchange Online: Get-Mailbox <identity of inactive mailbox> -InactiveMailboxOnly \FL ExchangeGuid . | Note: Sometimes you might have multiple mailboxes with the same email address, where one mailbox is an active mailbox and the other mailbox is in a soft-deleted (or inactive) state. In these situations, you have to specify the mailbox GUID to uniquely identify the mailbox to import the PST file to. To obtain this GUID for active mailboxes, run the following PowerShell command: Get-Mailbox <identity of active mailbox> \| FL ExchangeGuid .To obtain the GUID for soft-deleted (or inactive) mailboxes, run this command: Get-Mailbox <identity of soft-deleted or inactive mailbox> -SoftDeletedMailbox \| FL ExchangeGuid |
IsArchive | Specifies whether to import the PST file to the user’s archive mailbox. There are two options: FALSE: Imports the PST file to the user’s primary mailbox. TRUE: Imports the PST file to the user’s archive mailbox. This assumes that the user’s archive mailbox is enabled. If you set this parameter to TRUE and the user’s archive mailbox isn’t enabled, the import for that user will fail. If an import fails for one user (because their archive isn’t enabled and this property is set to TRUE ), the other users in the import job won’t be affected.If you leave this parameter blank, the PST file is imported to the user’s primary mailbox. Note: To import a PST file to a cloud-based archive mailbox for a user whose primary mailbox is on-premises, just specify TRUE for this parameter and specify the email address for the user’s on-premises mailbox for the Mailbox parameter. | FALSE Or TRUE |
TargetRootFolder | Specifies the mailbox folder that the PST file is imported to. If you leave this parameter blank, the PST file will be imported to a new folder named Imported at the root level of the mailbox (the same level as the Inbox folder and the other default mailbox folders). If you specify / , the folders and items in the PST file are imported to the top of the folder structure in the target mailbox or archive. If a folder exists in the target mailbox (for example, default folders such as Inbox, Sent Items, and Deleted Items), the items in that folder in the PST are merged into the existing folder in the target mailbox. For example, if the PST file contains an Inbox folder, items in that folder are imported to the Inbox folder in the target mailbox. New folders are created if they don’t exist in the folder structure for the target mailbox.If you specify /<foldername> , items and folders in the PST file are imported to a folder named <foldername> . For example, if you use /ImportedPst , items would be imported to a folder named ImportedPst. This folder will be located in the user’s mailbox at the same level as the Inbox folder.Tip: Consider running a few test batches to experiment with this parameter so you can determine the best folder location to import PST files. | (leave blank) Or / Or /ImportedPst |
ContentCodePage | This optional parameter specifies a numeric value for the code page to use for importing PST files in the ANSI file format. This parameter is used for importing PST files from Chinese, Japanese, and Korean (CJK) organizations because these languages typically use a double byte character set (DBCS) for character encoding. If this parameter isn’t used to import PST files for languages that use DBCS for mailbox folder names, the folder names are often garbled after they’re imported. For a list of supported values to use for this parameter, see Code Page Identifiers. Note: As previously stated, this is an optional parameter and you don’t have to include it in the CSV file. Or you can include it and leave the value blank for one or more rows. | (leave blank) Or 932 (which is the code page identifier for ANSI/OEM Japanese) |
SPFileContainer | For PST Import, leave this parameter blank. | Not applicable |
SPManifestContainer | For PST Import, leave this parameter blank. | Not applicable |
SPSiteUrl | For PST Import, leave this parameter blank. | Not applicable |
Note: The above table highlights case sensitivity to avoid PST mapping validation errors.
Tip: Double-check the email addresses in the Mailbox column. If even one is incorrect, the import could fail for that mailbox.
6. Upload the PST Import Mapping File
Once your mapping file is ready, it’s time to upload it to Microsoft 365:
- Return to the PST import job, check both boxes, and click Next.
- If you are accidently closed this page you have to reopen the page and again need to create one more SAS URL session to view the PST file in Azure blob storage and the section of the check boxes
- Click on Select mapping file.
- Browse to the PstImportMappingFile.csv file.
- Click Validate.
- If the text appears in green, it means the file is valid. Click Next.
- Review the PST import job and click Submit.
- The upload to the cloud has succeeded. Click Done.
Note:
If you accidentally close this page, you will need to reopen it. You must create a new SAS URL session to view the PST file in Azure blob storage. This is also necessary to access the section with the checkboxes.
Once you have finished viewing your file in Storage Explorer, don't forget to detach the session. Leaving it active may cause issues during the PST upload and import process.
Note: I encountered an issue during the PST mapping file validation. This was due to a mistake in the PST file name. The problem was case sensitivity. Please ensure you closely review the "File path & PST name" for accuracy.
Note: We are not done yet; there is one final step: starting the PST import to Microsoft 365.
7. Start the PST Import Process to Microsoft 365
Now that your PST files are uploaded and mapped correctly, you can begin the import:
Before you can begin importing the PST file to Office 365, you must wait for the analysis process to complete. Once finished, it will display the “Import completed” status and be ready for the next steps.
- Select the checkbox in front of the Import Job.
- Click on Import to Office 365 button.
- Select No, I want to import everything. Click Next.
- Select Yes, I want to filter it before importing. Click Next.
- Upload to the cloud succeeded. Click Done.
Note: Select Yes, I want to filter it before importing. Click Next. you can filter out the required data to be imported.
Tip: Depending on the size of the PST files and the number of mailboxes, the import may take some time. You can continue working while this process runs in the background.
8. Check the Status of the Import Job
Once the import has started, you can track its progress:
- To verify the status of the PST import job, click on the Import Job in the list view. Ensure that the PST import job displays a status of “completed.”
- Look at the status of your import job. It should show progress updates and any potential errors.
- Successfully imported a PST file to Microsoft 365.
Tip: If you encounter errors, click on the job to view detailed logs. This will help you troubleshoot the issue and try again if necessary.
Conclusion: Wrapping It Up
Note: Reference Microsoft Article
https://learn.microsoft.com/en-us/purview/use-network-upload-to-import-pst-files
https://learn.microsoft.com/en-us/purview/faqimporting-pst-files-to-office-36
Discover more from I-PICKS
Subscribe to get the latest posts sent to your email.