Use network upload to import PST files to Office 365

This article is for administrators. Are you trying to import PST files to your own mailbox? See Import email, contacts, and calendar from an Outlook .pst file

Use the Office 365 Import service to import PST files to user mailboxes. Why import PST files to Office 365?

  • It's a good way to migrate your organization's email to Office 365.

  • It helps address compliance needs of your organization by letting you:

    • Enable archive mailboxes to give users additional mailbox storage space.

    • Place mailboxes on hold to preserve content.

    • Use Microsoft eDiscovery tools to search for content in mailboxes.

    • Use retention policies to control how long mailbox content is retained.

    • Search the Office 365 audit log for mailbox-related events.

  • It helps protect against data loss. PST files that are imported to Office 365 mailboxes inherit the high availability features of Exchange Online, as opposed to storing the data on a user's computer.

  • The data is available to the user from all devices because it's stored in the cloud.

Here are the steps required to import PST files to Office 365 mailboxes:

Step 1: Copy the SAS URL and install Azure AzCopy

Step 2: Upload your PST files to Office 365

(Optional) Step 3: View a list of the PST files uploaded to Office 365

Step 4: Create the PST Import mapping file

Step 5: Create a PST Import job in Office 365

Important: You have to perform Step 1 only once to import PST files to Office 365 mailboxes. After you perform these steps, follow Step 2 through Step 5 each time you want to upload and import a batch of PST files.

Before you begin

  • You have to be assigned the Mailbox Import Export role to import PST files to Office 365 mailboxes. By default, this role isn't assigned to any role group in Exchange Online. You can add the Mailbox Import Export role to the Organization Management role group. Or you can create a new role group, assign the Mailbox Import Export role, and then add yourself as a member. For more information, see the "Add a role to a role group" or the "Create a role group" sections in Manage role groups.

    Additionally, you have to be a global administrator in your Office 365 organization to access the Import page (under Data governance) in the Office 365 Security & Compliance Center.

  • You need to store the PST files that you want to import to Office 365 on a file server or shared folder in your organization. In Step 2, you'll run the Azure AzCopy tool that will upload the PST files that are stored on this file server or shared folder to Office 365.

  • This procedure involves copying and saving a copy of a URL that contains an access key. This information will be used in Step 2 to upload your PST files, and in Step 3 if you want to view a list of the PST files uploaded to Office 365. Be sure to take precautions to protect this URL like you would protect passwords or other security-related information. For example you might save it to a password-protected Microsoft Word document or to an encrypted USB drive. See the More information section for an example of this combined URL and key.

  • You can import PST files to an inactive mailbox in Office 365. You do this by specifying the GUID of the inactive mailbox in the Mailbox parameter in the PST Import mapping file. See Step 4 for more information.

  • In an Exchange hybrid deployment, you can import PST files to a cloud-based archive mailbox for a user whose primary mailbox is on-premises. You do this by doing the following in the PST Import mapping file:

    • Specify the email address for the user's on-premises mailbox in the Mailbox parameter.

    • Specify the TRUE value in the IsArchive parameter.

    See Step 4 for more information.

  • After PST files are imported to an Office 365 mailbox, the retention hold setting for the mailbox is turned on for an indefinite duration. This means that the retention policy assigned to the mailbox won't be processed until you turn off the retention hold or set a date to turn off the hold. Why do we do this? If messages imported to a mailbox are old, they might be permanently deleted (purged) because their retention period has expired based on the retention settings configured for the mailbox. Placing the mailbox on retention hold will give the mailbox owner time to manage these newly-imported messages or give you time to change the retention settings for the mailbox. See the More information section for suggestions about managing the retention hold.

  • If you need to encrypt the PST files before you upload them to Office 365, see Use network upload to import RMS-encrypted PST files to Office 365.

  • For frequently asked questions about using network upload to import PST files to Office 365, see FAQ about importing PST files to Office 365.

Step 1: Copy the SAS URL and install Azure AzCopy

The first step is to download and install the Azure AzCopy tool, which is the tool that you'll run in Step 2 to upload PST files to Office 365. You'll also copy the SAS URL for your organization. This URL is a combination of the network URL for the Azure storage location in the Microsoft cloud for your organization and a Shared Access Signature (SAS) key. This key provides you with the necessary permissions to upload PST files to your Azure storage location. As previously stated, take precautions to protect the SAS URL. It's unique to your organization and will be used in Step 2.

  1. Go to https://protection.office.com.

  2. Sign in to Office 365 using the credentials for an administrator account in your Office 365 organization.

  3. In the left pane, click Data governance and then click Import.

  4. On the Import page, click Go to the Import service.

  5. On the Import data to Office 365 page, click New job Add Icon , and then click Upload email messages (PST files).

    The Upload files over the network page is displayed.

  6. In step 2, click Show network upload SAS URL.

  7. After the URL is displayed, copy it and save it to a file. Be sure to copy the entire URL.

  8. In step 3, click Download tool to download and install the Azure AzCopy tool.

  9. In the pop-up window, click Run to install AzCopy.

    Important: Be sure to install AzCopy in the default location (%ProgramFiles(x86)%\Microsoft SDKs\Azure\AzCopy) on a computer running 64-bit Windows). That's because if you want to encrypt the PST files before they're uploaded to Office 365, the O365ImportTool.exe tool that you run to encrypt them looks for AzCopy in this location.

  10. Click Cancel to close the Upload files over the network page.

Return to top

Step 2: Upload your PST files to Office 365

Now you're ready to use the AzCopy.exe tool to upload PST files to Office 365. This tool uploads and stores them in an Azure storage location in the Microsoft cloud. To complete this step, the PST files have to be located in a file share or file server in your organization. This is known as the source directory in the following procedure. Each time you run the AzCopy tool, you can specify a different source directory.

  1. Open a Command Prompt on your local computer.

  2. Go to the directory where you installed the AzCopy.exe tool in Step 1. If you installed the tool in the default location, go to %ProgramFiles(x86)%\Microsoft SDKs\Azure\AzCopy.

  3. Run the following command to upload the PST files to Office 365.

    AzCopy.exe /Source:<Location of PST files> /Dest:<SAS URL> /V:<Log file location>

    The following table describes the parameters and their required values. Note that the information you obtained in the previous step is used in the values for these parameters.

    Parameter

    Description

    Example

    /Source:

    Specifies the source directory in your organization that contains the PST files that will be uploaded to Office 365.

    /Source:\\FILESERVER01\PSTs

    /Dest:

    Specifies the SAS URL that you obtained in Step 1.

    Be sure to surround the value of this parameter with double-quotation marks (" ").

    Tip: (Optional) You can specify a subfolder in the Azure storage location to upload the PST files to. You do this by adding a subfolder location (after "ingestiondata") in the SAS URL. The first example doesn't specify a subfolder; that means the PSTs will be uploaded to the root (named ingestiondata) of the Azure storage location. The second example uploads the PST files to a subfolder (named PSTFiles) in the root of the Azure storage location.

    /Dest:"https://3c3e5952a2764023ad14984.blob.core.windows.net/ingestiondata?sv=2012-02-12&se=9999-12-31T23%3A59%3A59Z&sr=c&si=IngestionSasForAzCopy201601121920498117&sig=Vt5S4hVzlzMcBkuH8bH711atBffdrOS72TlV1mNdORg%3D"

    Or

    /Dest:"https://3c3e5952a2764023ad14984.blob.core.windows.net/ingestiondata/PSTFiles?sv=2012-02-12&se=9999-12-31T23%3A59%3A59Z&sr=c&si=IngestionSasForAzCopy201601121920498117&sig=Vt5S4hVzlzMcBkuH8bH711atBffdrOS72TlV1mNdORg%3D"

    /V:

    Outputs verbose status messages into a log file. By default, the verbose log file is named AzCopyVerbose.log in %LocalAppData%\Microsoft\Azure\AzCopy. If you specify an existing file location for this option, the verbose log will be appended to that file.

    /V:C:\Users\Admin\Desktop\Uploadlog.log

    /S

    This optional switch specifies the recursive mode so that the AzCopy tool will copy PSTs files that are located in subfolders in the source directory that is specified by the /Source: parameter.

    Note: If you include this switch, PST files in subfolders will have a different file pathname in the Azure storage location after they're uploaded. You'll have to specify the exact file pathname in the CSV file that you create in Step 4.

    /S

    Here's an example of the syntax for the AzCopy.exe tool using actual values for each parameter:

    AzCopy.exe /Source:\\FILESERVER1\PSTs /Dest:"https://3c3e5952a2764023ad14984.blob.core.windows.net/ingestiondata?sv=2012-02-12&se=9999-12-31T23%3A59%3A59Z&sr=c&si=IngestionSasForAzCopy201601121920498117&sig=Vt5S4hVzlzMcBkuH8bH711atBffdrOS72TlV1mNdORg%3D" /V:C:\Users\Admin\Desktop\AzCopy1.log

    After you run the command, status messages are displayed that show the progress of uploading the PST files. A final status message shows the total number of files that were successfully uploaded.

    Tip: After you successfully run the AzCopy.exe command and verify that all the parameters are correct, save a copy of the command line syntax to the same (secured) file where you copied the information you obtained in Step 1. Then you can copy and paste this command in a Command Prompt each time that you want to run the AzCopy.exe tool to upload PST files to Office 365. The only value you might have to change are the ones for the /Source: parameter. This depends on the source directory where the PST files are located.

Return to top

(Optional) Step 3: View a list of the PST files uploaded to Office 365

As an optional step, you can install and use the Microsoft Azure Storage Explorer (which is a free, open source tool) to view the list of the PST files that you've uploaded to the Azure blob. There are two good reasons to do this:

  • Verify that PST files from the shared folder or file server in your organization were successfully uploaded to the Azure blob.

  • Verify the filename (and the subfolder pathname if you included one) for each PST file uploaded to the Azure blob. This is really helpful when you're creating the PST mapping file in the next step because you have to specify both the folder pathname and filename for each PST file. Verifying these names can help reduce potential errors in your PST mapping file.

Note: The Microsoft Azure Storage Explorer is in Preview.

To install the Azure Storage Explorer and connect to your Azure storage area:

  1. Download and install the Microsoft Azure Storage Explorer tool.

  2. Start the Microsoft Azure Storage Explorer, right-click Storage Accounts in the left pane, and then click Connect to Azure storage.

    Right-click Storage Accounts and then click Connect to Azure storage
  3. In the box under Connect to Azure storage, paste the SAS URL that you obtained in Step 1, and then click Next.

    Paste the SAS URL  in the box on the Connect to Azure Storage page
  4. On the Connection summary page, you can review the connection information, and then click Connect.

  5. Under Storage Accounts, expand the (Service SAS) node, and then expand the Blob Containers node.

  6. Right-click ingestiondata, and then click Open Blob Container Editor.

    Right-click ingestiondata and then click Open Blob Container Editor

    The Azure storage area, with a list of the PST files that you uploaded in Step 2 is displayed.

    Azure Storage Explorer displays a list of the PST files that you uploaded
  7. When you're finished using the Microsoft Azure Storage Explorer, right-click ingestiondata, and then click Detach to disconnect from your Azure storage area. Otherwise, you'll receive an error the next time you try to attach.

    Right-click ingestion and click Detach to disconnect from your Azure storage area

Return to top

Step 4: Create the PST Import mapping file

After the PST files have been uploaded to the Azure storage location for your Office 365 organization, the next step is to create a comma separated value (CSV) file that specifies which user mailboxes the PST files will be imported to. You will submit this CSV file in the next step when you create a PST Import job.

  1. Download a copy of the PST Import mapping file.

  2. Open or save the CSV file to your local computer. The following example shows a completed PST Import mapping file (opened in NotePad). It's much easier to use Microsoft Excel to edit the CSV file.

    Workload,FilePath,Name,Mailbox,IsArchive,TargetRootFolder,ContentCodePage,SPFileContainer,SPManifestContainer,SPSiteUrl
    Exchange,,annb.pst,annb@contoso.onmicrosoft.com,FALSE,/Inbox,,,,
    Exchange,,annb_archive.pst,annb@contoso.onmicrosoft.com,TRUE,/Inbox,,,
    Exchange,,donh.pst,donh@contoso.onmicrosoft.com,FALSE,/Inbox,,,,
    Exchange,,donh_archive.pst,donh@contoso.onmicrosoft.com,TRUE,/Inbox,,,,
    Exchange,PSTFiles,pilarp.pst,pilarp@contoso.onmicrosoft.com,FALSE,/Inbox,,,,
    Exchange,PSTFiles,pilarp_archive.pst,pilarp@contoso.onmicrosoft.com,TRUE,/Inbox,,,,
    Exchange,PSTFiles,tonyk.pst,tonyk@contoso.onmicrosoft.com,TRUE,/Inbox,,,,
    Exchange,PSTFiles,tonyk_archive.pst,tonyk@contoso.onmicrosoft.com,TRUE,/Inbox,,,,
    Exchange,PSTFiles,zrinkam.pst,zrinkam@contoso.onmicrosoft.com,TRUE,/Inbox,,,,
    Exchange,PSTFiles,zrinkam_archive.pst,zrinkam@contoso.onmicrosoft.com,TRUE,/Inbox,,,,

    The first row, or header row, of the CSV file lists the parameters that will be used by the PST Import service to import the PST files to user mailboxes. Each parameter name is separated by a comma. Each row under the header row represents the parameter values for importing a PST file to a specific mailbox. You will need a row for each PST file that you want to import to a user mailbox. Be sure to replace the placeholder data in the mapping file with your actual data.

    Note: Don't change anything in the header row, including the SharePoint parameters; they will be ignored during the PST Import process.

  3. Use the information in the following table to populate the CSV file with the required information.

    Parameter

    Description

    Example

    Workload

    Specifies the Office 365 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.

    If you didn't include an optional subfolder name in the SAS URL in the /Dest: parameter in Step 2, leave this parameter blank in the CSV file. 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 /Dest: parameter 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.

    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.

    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 -InactiveMailboxOnly <identity of inactive mailbox> | FL Guid

    Note: In some cases, 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 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 Guid. To obtain the GUID for soft-deleted (or inactive) mailboxes, run this command Get-Mailbox - <identity of soft-deleted or inactive mailbox> -SoftDeletedMailbox | FL Guid.

    annb@contoso.onmicrosoft.com

    Or

    2d7a87fe-d6a2-40cc-8aff-1ebea80d4ae7

    IsArchive

    Specifies whether or not 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.

    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 will be imported to a new folder named Imported located at the root level of the mailbox (the same level as the Inbox and the other default mailbox folders).

    Tip: Consider running a few test batches to experiment with this parameter so you can determine the best folder location to import PSTs files to.

    /Inbox

    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

Return to top

Step 5: Create a PST Import job in Office 365

The last step is to create the PST Import job in the Import service in Office 365. As previously explained, you will submit the PST Import mapping file that you created in Step 4. After you create the new job, the Import service will use the information in the mapping file to import the PST files (that you uploaded to Office 365 in Step 2) to the specified user mailbox.

  1. Go to https://protection.office.com.

  2. Sign in to Office 365 using the credentials for an administrator account in your Office 365 organization.

  3. In the left pane, click Data governance and then click Import.

  4. On the Import page, click Go to the Import service.

  5. On the Import data to Office 365 page, click New job Add Icon , and then click Upload email messages (PST files).

  6. On the Upload files over the network page, click the I'm done uploading my files and I have access to the mapping file check boxes, and then click Next.

  7. Type a name for the PST Import job, and then click Next.

  8. Click Add Add Icon to select the PST Mapping file that you created in Step 4.

  9. After the name of the CSV file appears in the list, select it and then click Validate to check your CSV file for errors.

    The CSV file has to be successfully validated to create a PST Import job. If the validation fails, click the Invalid link in the Status column. A copy of your PST Import mapping file is opened, with a error message for each row in the file that failed.

  10. When the PST mapping file is successfully validated, read the terms and conditions document, and then click the checkbox.

  11. Click Finish to submit the job.

    The job is displayed in the list of PST Import jobs on the Import data to Office 365 page.

  12. Select the job and click Refresh Refresh icon to update the status information that's displayed in the details pane.

  13. In the details pane, click View details to get the latest status for the selected job.

Return to top

More information

  • Here's an example of the Shared Access Signature (SAS) URL that's obtained in Step 1. This example also contains the syntax for the command that you run in the AzCopy.exe tool to upload PST files to Office 365. Be sure to take precautions to protect the SAS URL just like you would protect passwords or other security-related information.

    SAS URL: https://3c3e5952a2764023ad14984.blob.core.windows.net/ingestiondata?sv=2012-02-12&se=9999-12-31T23%3A59%3A59Z&sr=c&si=IngestionSasForAzCopy201601121920498117&sig=Vt5S4hVzlzMcBkuH8bH711atBffdrOS72TlV1mNdORg%3D
    
    AzCopy.exe /Source:<Location of PST files> /Dest:<SAS URL> /V:<Log file location>
    
    EXAMPLES
    
    This example uploads PST files to the root of the Azure storage location:
    
    AzCopy.exe /Source:\\FILESERVER1\PSTs /Dest:"https://3c3e5952a2764023ad14984.blob.core.windows.net/ingestiondata?sv=2012-02-12&se=9999-12-31T23%3A59%3A59Z&sr=c&si=IngestionSasForAzCopy201601121920498117&sig=Vt5S4hVzlzMcBkuH8bH711atBffdrOS72TlV1mNdORg%3D" /V:c:\Users\Admin\Desktop\AzCopy1.log
    
    This example uploads PST files to a subfolder named PSTFiles in the Azure storage location:
    
    AzCopy.exe /Source:\\FILESERVER1\PSTs /Dest:"https://3c3e5952a2764023ad14984.blob.core.windows.net/ingestiondata/PSTFiles?sv=2012-02-12&se=9999-12-31T23%3A59%3A59Z&sr=c&si=IngestionSasForAzCopy201601121920498117&sig=Vt5S4hVzlzMcBkuH8bH711atBffdrOS72TlV1mNdORg%3D" /V:c:\Users\Admin\Desktop\AzCopy1.log 
  • As previously explained, the Office 365 Import service turns on the retention hold setting (for an indefinite duration) after PST files are imported to a mailbox. This means the RentionHoldEnabled property is set to True so that the retention policy assigned to the mailbox won't be processed. This gives the mailbox owner time to manage the newly-imported messages by preventing a deletion or archive policy from deleting or archiving older messages. Here are some steps you can take to manage this retention hold:

    • After a certain period of time, you can turn off the retention hold by running the Set-Mailbox -RetentionHoldEnabled $false command. For instructions, see Place a mailbox on retention hold.

    • You can configure the retention hold so that it's turned off on some date in the future. You do this by running the Set-Mailbox -EndDateForRetentionHold <date> command. For example, assuming that today's date is July 1, 2016 and you want the retention hold turned off in 30 days, you would run the following command: Set-Mailbox -EndDateForRetentionHold 8/1/2016. In this scenario, you would leave the RentionHoldEnabled property set to True. For more information, see Set-Mailbox.

    • You can change the settings for the retention policy that's assigned to the mailbox so that older items that were imported won't be immediately deleted or moved to the user's archive mailbox. For example, you could lengthen the retention age for a deletion or archive policy that's assigned to the mailbox. In this scenario, you would turn off the retention hold on the mailbox after you changed the settings of the retention policy. For more information, see Set up an archive and deletion policy for mailboxes in your Office 365 organization.

Return to top

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!

×