SharePoint / SharePoint/sp-dev-docs

Issue with Sharepoint Migration API CreateSPAsyncReadJob manifest.xml and CreateMigrationJob.

Open
#9,979 4 comments 1 reaction 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Apr 23, 2025.

Needs: Triage :mag: sharepoint-developer-support type:bug-confirmed type:bug-suspected
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

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
  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)
Additional environment details

PnP.Core 1.14.0
PnP.Framework 1.17.0
WindowsAzure.Storage 9.3.3

Describe the bug / error

When using SharePoint migration API with CreateSPAsyncReadJob and CreateMigrationJob, we have an issue where CreateMigrationJob can’t parse the manifest that the CreateSPAsyncReadJob creates. It throws an error
[System.Xml.Schema.XmlSchemaValidationException] [The 'Description' attribute is not declared.]

  1. Using CreateSPAsyncReadJob to create the migration package which works fine:

         ClientResult<AsyncReadJobInfo> output = sourceContext.Site.CreateSPAsyncReadJob(
            listUrl,
            new AsyncReadOptions
            {
                IncludeDirectDescendantsOnly = false,
                IncludeSecurity = false,
                IncludeExtendedMetadata = true,
            },
            null,
            manifestUrlReadWrite,
            reportQueueUrlReadAddUpdateProcess);
        sourceContext.ExecuteQuery();
    
  2. Move the packages to root level of azure container.

  3. Start migration job using CreateMigrationJob

        var migrationJobId = targetContext.Site.CreateMigrationJob(
          targetContext.Web.Id,
          sourceContainerUrlReadList,
          manifestUrlReadListWrite,
          reportQueueUrlReadAddUpdateProcess);
    
        targetContext.ExecuteQuery();
    

After the third step the migration job is started, after it runs for a while (processing security and other xml’s it fails on parsing the manifest.xml

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
Expected behavior

When import is started, the manifest file should be parsed without errors by the migration job, and migration of manifest content should be started.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.