OneDrive Migration API

Steel Contributor

Hello, maybe someone has expierence with the Migration API for the file uploads to OneDrive for Business? I found the description at and the upload works fine with the commands. I just have the issue I don't know how to access the import logs as described.


If you’re using the temporary Azure storage created by Invoke-SPOMigrationEncryptUploadSubmit in step 4, the import log SAS URL can be obtained by decrypting the Azure queue message with “Event” value “JobLogFileCreate”. With the import log SAS URL, you can download the log file and decrypt it with the same encryption key as returned in step 4.


I have the SAS URL and encryption key but don't know the Powershell commands to access the Azure queue messages to get the import logs? Can someone help me with the commands or more information?




2 Replies

I have the same problem.

I can access the Azure Queue using Azure Storage Explorer and pasting in the uri.

But everything is encrypted and gives me noe way of reading the messages.


How can I get the logs, error and warning?

I just ran into the same issue.  Here's what I kind of figured out.  you need to use two other cmdlets.... Get-SPOMigrationJobProgress & Get-SPOMigrationJobStatus



$job = Invoke-SPOMigrationEncryptUploadSubmit -SourceFilesPath $sourceFiles -SourcePackagePath $targetPackage -Credentials $creds -TargetWebUrl $targetWebUrl 

$encryption = $job.Encryption

$queueLink = $job.ReportingQueueUri.AbsoluteUri

$jobID = $job.jobid

Get-SPOMigrationJobProgress -AzureQueueUri $queueLink -Credentials $creds -TargetWebUrl $targetWebUrl -JobIds $jobID -EncryptionParameters $encryption

Get-SPOMigrationJobStatus -TargetWebUrl $targetWebUrl -Credentials $creds -JobId $jobID