Microsoft 365 Migration

Preserve SharePoint Document Authors During Library Migration

Natalie TaylorNatalie Taylor Nov 25, 2026 868 views

Question details

Preserve document authors, editors, dates, and version history when migrating an on-premises SharePoint library to SharePoint Online.

Preserve SharePoint Document Authors During Library Migration
Product
SharePoint Online and SharePoint on-premises
Device & OS
not provided
Scenario
A PowerShell migration script uploads document versions to a new SharePoint Online library and attempts to restore their metadata.
Observed behavior
The script cannot reliably update the Author or Editor person fields and later reports that a file URL is invalid or belongs to a different web.
Before you start

Identify the source and destination site URLs, a test document with multiple versions, and the accounts corresponding to its original author and editor. Confirm that the migration account can access the source and has sufficient permissions on the destination library.

Solution 1Recommended

Check destination users and document paths in the script

Use this approach to diagnose person-field updates and the reported invalid URL before continuing a custom migration.

Author and Editor are SharePoint person fields. Their lookup IDs refer to users in the destination site, so a source-site ID or a display-name match alone is not a reliable mapping.

Updating a list item's metadata does not by itself recreate the original version history or guarantee preservation of every version's author and dates.

1
Verify the destination users

In the destination SharePoint site, open Site permissions and confirm that the original users can be resolved in the target environment. Map source identities to destination accounts using a stable identifier such as a login name rather than display name alone.

2
Use destination person-field values

In the PowerShell script, resolve each mapped account in the destination site and use the resulting destination user ID in a SharePoint CSOM FieldUserValue for the Author or Editor field. Verify that the migration account has permission to perform the update.

3
Check the file URL and connection

Before calling Get-PnPFile, check the active connection and print the file's full server-relative path, including the destination site and library. Confirm that the file exists in that web and that the path is handled consistently when the filename contains spaces.

4
Test one document

Run the upload and metadata update on a test document, then open its library details and Version history menu to compare the author, editor, dates, and versions with the source.

Check destination users and document paths in the script
Custom script limitations: UpdateOverwriteVersion is not a complete version-history migration method. If the error persists, share the sanitized script, full error, destination path, and reproduction steps in a SharePoint development forum.
Free Microsoft Office alternative

Work with Migrated Documents in WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface and Microsoft Office format compatibility for a smooth transition. It can help you work with migrated files, but it does not migrate SharePoint libraries or repair their metadata.

Open and edit documents after migrationCompatible with Microsoft Office formats including DOCX, XLSX, and PPTXFamiliar document, spreadsheet, and presentation interfaceFree and lightweight for everyday office work
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't matching users by display name reliably preserve the author?

Display names can be duplicated or changed, and person-field IDs differ between sites. Map each source identity to a destination account, then resolve that account in the destination site before updating the field.

Does UpdateOverwriteVersion preserve all document versions?

No. It updates a list item without creating a normal new version, but it does not recreate a document's complete source version history. Use a supported migration tool or implement and validate version migration separately.

Why does Get-PnPFile report an invalid URL?

The path may be incomplete, point to another web, or refer to a file that was not uploaded where expected. Check the active destination connection and the full server-relative path, including the site and library.

Can I migrate without PnP PowerShell?

Yes. You can evaluate the SharePoint Migration Tool for a supported source, or develop against SharePoint APIs or CSOM instead. There is no single built-in PowerShell command that automatically preserves all authors, dates, and version history for every migration.