SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.25k stars 1.01k forks source link

Migration API CreateMigrationJob failed reading a manifest file generated with the Export API CreateSPAsyncReadJob #7572

Open DimitriTlvdRITS opened 2 years ago

DimitriTlvdRITS commented 2 years ago

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

SharePoint CSOM

Developer environment

Windows

What browser(s) / client(s) have you tested

Additional environment details

No response

Describe the bug / error

Following the MSDN documentation for SharePoint Migration, I am doing an Export of a site library :

ClientResult<AsyncReadJobInfo> output = clientContext.Site.CreateSPAsyncReadJob(
            "https://contoso1.sharepoint.com/sites/ThePerspective/Shared Documents",
                    new AsyncReadOptions {
                        IncludeDirectDescendantsOnly = true,
                        IncludeSecurity = true,
                        IncludeVersions = false,
                        IncludeExtendedMetadata = true
                    },
                    null,
                    azManifestContainerUrl,
                    azReportQueueUrl);

The export is successful and generate a folder (named with a GUID) containing all XML files expected (such as Manifest.XML). I then copy all xml files at the root of the container and create the snapshot for each file (since it may not be possible to directly link the folder generated).

I then try to use that manifest to Import it on another existing site "https://contoso2.sharepoint.com/sites/ThePerspective/Shared Documents" : clientContext.Site.CreateMigrationJob(clientContext.Web.Id, sourceFileContainerUrl, manifestContainerUrl, azureQueueReportUrl);

The job is created and queued and leads to this error : JobFatalError, message The 'Description' attribute is not declared.

By removing the Description in the DocumentLibrary node in the Manifest.XML, the error is getting moved to the following attribute Direction then ImageUrl and so on.

Steps to reproduce

  1. Create the manifest file using the CreateSPAsyncReadJob method
  2. Copy and create snapshot for all xml files at the root of the container
  3. Create the Import job using CreateMigrationJob method
  4. The migration job is queud, runs and always fail with error

Expected behavior

Import a manifest file generated by export should leads to a successful migration job

ghost commented 2 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

TomasLiutvinas commented 3 weeks ago

Was this ever resolved? I am encountering this issue at the moment as well.