Skip to main content

Import PST Data Files into Exchange Online

Uploading data to the Consumer and Enterprise Exchange Online is free, however a charge will be accrued, if you are uploading to a GCC Exchange Online.

Assigning the Mailbox Import Export Permissions

It can take up to 24 hours for the permissions to propagate down to the users.

  1. Open the Exchange Admin Panel.
  2. On the left-hand navigation pane, click Roles then click Admin Roles.
  3. Click the Add Role Group button.
  4. Enter a name for the Role Group, then click Next.
  5. Under permissions, find and select the Mailbox Import Export permission.
  6. Click Next.
  7. Add a user to manage the role group then click Next.
  8. Verify that all the information is correct, then click Finish.

Importing into a Consumer/Enterprise Account

The account must have the Mailbox Import Export permissions before Import Requests can be created.

Importing into a GCC Account

The account must have the Mailbox Import Export permissions before Import Requests can be created.

Prerequisites

Create the Storage Blob

  1. Open the Microsoft Azure homepage and click Storage Accounts.
  2. Click Create.
  3. Fill out the form then click Review + Create.
  4. If there are no errors, click the Create button.

Retrieve the SAS Key

  1. From the Azure homepage, click Storage accounts.
  2. Click the storage account you created above.
  3. Click Storage Browser on the left-hand side, then click Open Azure Storage Explorer at the bottom of the page.
  4. When prompted, click the Always Allow Checkbox, then click Open.

    image-1652284781063.png

  5. Wait for Azure Storage Explorer to open. Click Select on the Account banner and log in if prompted.

    image-1652284934374.png

  6. Select your Azure subscription from the left-hand Account Management pane.
  7. Click Open Explorer.
  8. Under your Azure Subscription, double-click Storage Accounts.
  9. Double-click the storage account you created for importing Exchange PST files.
  10. Right-click Blob Containers, then click Create Blob Container.

    image-1652285994760.png

  11. Enter a name for the Blob Container, then press Enter. The name must be all lowercase with no spaces, In this tutorial, pst is used.
  12. Right-click the Blob Container you just created, then click Get Shared Access Signature.

    image-1652286102917.png

  13. For uploading, select all the permissions, then click Create.
  14. Copy the Connection URL for use later.

Upload the PST Files using AzCopy

  1. Copy the AzCopy Tool to the directory that contains your Exchange PST files.
  2. Open a Command Prompt or PowerShell window and navigate to the directory that contains your Exchange PST files.
  3. Enter the following command: azcopy.exe copy "location-of-pst" "connection-url"
    1. Replace location-of-pst with the full file path to your Exchange PST files.
    2. Replace the connection-url with the SAS (Shared Access Signature) URL from the steps above.
  4. Press Enter and let the command process.

Create the Mail Import Request

  1. Open PowerShell.
  2. Run the Connect-ExchangeOnline command then login with an Exchange Online Account that has Mail Import Export permissions.
  3. Enter the following command then press Enter: New-MailboxImportRequest -Name "import-name" -Mailbox user@example.com -AzureBlobStorageAccountUri "url-of-pst-blob" -AzureAccessSignatureToken "token" -TargetRootFolder "/"
    1. Replace import-name with a unique Mailbox Import name.
    2. Replace user@example.com with an appropriate username.
    3. Replace url-of-pst-blob with the URL to the user's PST on the Azure Storage Blob. Example: https://myazureblob.blob.core.windows.net/pst-files/user.inbox.pst
    4. Replace token with the Shared Access Token of the Azure Storage Blob containing the PST files.
  4. If the command was run successfully, a queued file report will be shown.
  5. You can check the status of the Mailbox Import by running the Get-MailboxImportRequest command.