OneDrive Migration API

%3CLINGO-SUB%20id%3D%22lingo-sub-24561%22%20slang%3D%22en-US%22%3EOneDrive%20Migration%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-24561%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20maybe%20someone%20has%20expierence%20with%20the%20Migration%20API%20for%20the%20file%20uploads%20to%20OneDrive%20for%20Business%3F%20I%20found%20the%20description%20at%20%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2FUpload-SharePoint-data-to-Office-365-555049c6-15ef-45a6-9a1f-a1ef673b867c%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2FUpload-SharePoint-data-to-Office-365-555049c6-15ef-45a6-9a1f-a1ef673b867c%3C%2FA%3E%26nbsp%3Band%20the%20upload%20works%20fine%20with%20the%20commands.%26nbsp%3BI%20just%20have%20the%20issue%20I%20don't%20know%26nbsp%3Bhow%20to%20access%20the%20import%20logs%20as%20described.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EIf%20you%E2%80%99re%20using%20the%20temporary%20Azure%20storage%20created%20by%20Invoke-SPOMigrationEncryptUploadSubmit%20in%20step%204%2C%20the%20import%20log%20SAS%20URL%20can%20be%20obtained%20by%20decrypting%20the%20Azure%20queue%20message%20with%20%E2%80%9CEvent%E2%80%9D%20value%20%E2%80%9CJobLogFileCreate%E2%80%9D.%20With%20the%20import%20log%20SAS%20URL%2C%20you%20can%20download%20the%20log%20file%20and%20decrypt%20it%20with%20the%20same%20encryption%20key%20as%20returned%20in%20step%204.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20have%20the%20SAS%20URL%20and%20encryption%20key%20but%20don't%20know%20the%20Powershell%20commands%20to%20access%20the%20Azure%20queue%20messages%20to%20get%20the%20import%20logs%3F%20Can%20someone%20help%20me%20with%20the%20commands%20or%20more%20information%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ETobias%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-24561%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOneDrive%20for%20Business%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-39172%22%20slang%3D%22en-US%22%3ERe%3A%20OneDrive%20Migration%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-39172%22%20slang%3D%22en-US%22%3E%3CP%3EI%20just%20ran%20into%20the%20same%20issue.%20%26nbsp%3BHere's%20what%20I%20kind%20of%20figured%20out.%20%26nbsp%3Byou%20need%20to%20use%20two%20other%20cmdlets....%26nbsp%3BGet-SPOMigrationJobProgress%20%26amp%3B%26nbsp%3BGet-SPOMigrationJobStatus%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%24job%20%3D%20Invoke-SPOMigrationEncryptUploadSubmit%20-SourceFilesPath%20%24sourceFiles%20-SourcePackagePath%20%24targetPackage%20-Credentials%20%24creds%20-TargetWebUrl%20%24targetWebUrl%20%0A%0A%0A%24encryption%20%3D%20%24job.Encryption%0A%0A%24queueLink%20%3D%20%24job.ReportingQueueUri.AbsoluteUri%0A%0A%24jobID%20%3D%20%24job.jobid%0A%0A%0AGet-SPOMigrationJobProgress%20-AzureQueueUri%20%24queueLink%20-Credentials%20%24creds%20-TargetWebUrl%20%24targetWebUrl%20-JobIds%20%24jobID%20-EncryptionParameters%20%24encryption%0A%0AGet-SPOMigrationJobStatus%20-TargetWebUrl%20%24targetWebUrl%20-Credentials%20%24creds%20-JobId%20%24jobID%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-36241%22%20slang%3D%22en-US%22%3ERe%3A%20OneDrive%20Migration%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-36241%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20the%20same%20problem.%3C%2FP%3E%3CP%3EI%20can%20access%20the%20Azure%20Queue%20using%20Azure%20Storage%20Explorer%20and%20pasting%20in%20the%20uri.%3C%2FP%3E%3CP%3EBut%20everything%20is%20encrypted%20and%20gives%20me%20noe%20way%20of%20reading%20the%20messages.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20can%20I%20get%20the%20logs%2C%20error%20and%20warning%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hello, maybe someone has expierence with the Migration API for the file uploads to OneDrive for Business? I found the description at https://support.office.com/en-us/article/Upload-SharePoint-data-to-Office-365-555049c6-15ef-45a6-9a1... 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?

 

Thanks

Tobias

2 Replies
Highlighted

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?

Highlighted

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