Migrate Files From SharePoint using the new Office 365 Import Service

This is a Step-by-Step tutorial to Migrate Files from File Share to SharePoint Online using the new Office 365 Import Service. Office 365 Import Service was launched by Microsoft initially to migrate PST files to Office 365 Exchange mailboxes. Recently, Microsoft extended the Import Service so users on On-premises can Import data into SharePoint Online and OneDrive for Business.
Note: Office 365 Import service (which is currently in Preview) will require a License to use in future. This is NOT a Free to use service. You can use the alternative method of using Azure Storage where an Azure Subscription would be required to create the storage space for import. See the detailed post on Step-by-Step: Migrate Files to SharePoint Online using Azure Storage

In this post, let’s discuss the high-level step

    • To begin with, you would need SharePoint Online Management Shell to connect to Office 365 and Azure services. Check out my post Connect to Office 365 using PowerShell to connect to your Office 365 site using PowerShell.After connecting to Office 365, my window will look like below.
    • Now before you begin, make sure you have the Content ready that you need to upload. I have created a Shared folder “SharePointFileShare” with few files in my local machine’s C: drive.This folder needs to be shared so Azure tool can access it.
    • Next, Navigate to Office 365 admin center and then select IMPORT.
    • On Import Page, choose plus (+) then select Upload data over the network.
      In the Wizard, click on Show Secure Key & Show URL and then Copy the key & URL. Copy the Key & URL and minimize the wizard window for now.
    • Next, let’s create a Package to Upload. A “package” comprises of content (binaries such as documents, images, attachments) and manifest XML files.

The basic process is as follows :

First, we will use New-SPOMigrationPackage cmdlet with parameters to create a package from a file share. Parameters explained:
Source: Source is Shared files are on your machine where you have the files to upload or on On-prem SharePoint. For e.g. C:\SharePointFileShare is Source in our case.
Output or Package path: Once you run the New-SPOMigrationPackage command you would create a SharePoint Online Package as an Output.
Parameter: IncludeFileSharePermissions need if you want the permissions on the files to be reapplied automatically when they reach the cloud.

  • So once you have the package ready, lets use the Set-SPOMigrationPackageAzureSource to specify the Azure Source & key (copied in step #4) and upload the Azure Storage source to temporarily keep the files.
    $azurelocations = Set-SPOMigrationPackageAzureSource -SourceFilesPath \\IshaPC\SharePointFileShare -SourcePackagePath C:\SPO_Package -AccountName AccountName -AccountKey “SecureKey” -PackageContainerName package
    If successful, Verify that the files have been uploaded in Azure Storage.
    8. You can check the files that are uploaded in Azure using Azure Storage Explorer. Go to the link and download the Azure Storage Explorer.
    Note : Do not edit/delete/modify any tables/containers/blobs using Azure Storage Explorer or any other tool. Doing so may cause job failures that will be impossible to recover from.
  • Finally, now that the files have been uploaded, let’s just Create a job for Office 365 to import these files into the SharePoint Online library.

Now before proceeding, prepare a SharePoint Online Mapping file. Download the SPO Mapping file to fill-up your own entries.

Upload the file in next screen of your wizard when ready

Finally, verify in the Office 365 admin center to see the status of the job.
If you do not want to use Office 365 Import for some reasons check out this very similar method that required Azure Storage (can be created using your Azure Subscription).