I try to migrate my sharepoint library from on-premise SharePoint 2013 to SharePoint online. I do this by folowing SharePoint Online deployment advisor instructions.
I did this successfully:
Export-SPWeb -Identity http://contosoweb/sites/project01 -Path C:\migration\Project01Library -ItemUrl "Shared Documents" -NoFileCompression
I created an user mapping CSV file. It looks like:
OnPremSID,UPN,isGroup
s-1-5-21-79778582-742657681-665348310-13225,tan@contoso.com,False
s-1-5-21-79778582-742657681-665348310-11185,ANad@contoso.com,False
s-1-5-21-79778582-742657681-665348310-13306,otsap@contoso.com,False
After that I defined variables and tried to do this:
$finalPackages = ConvertTo-SPOMigrationTargetedPackage -ParallelImport -SourceFilesPath $sourceFiles -SourcePackagePath $sourcePackage -OutputPackagePath $targetPackage -Credentials $cred -TargetWebUrl $targetWeb -NoAzureADLookup -TargetDocumentLibraryPath $targetDocLib -UserMappingFile $userMapFile
But I got an error:
ConvertTo-SPOMigrationTargetedPackage : Object reference not set to an
instance of an object.
At line:1 char:18
+ $finalPackages = ConvertTo-SPOMigrationTargetedPackage -ParallelImport
-SourceFi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+ CategoryInfo : NotSpecified: (:) [ConvertTo-SPOMigrationTargete
dPackage], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Online.S
harePoint.PowerShell.ConvertToMigrationPackage
How to fix it? I have diferent domain in SharePoint online and on-premise SharePoint. Should be usernames in the mapping csv file from on-premise SharePoint or SharePoint online domain (well, the error is the same)?