Fix SharePoint Document ID Error After Migrating Files
Question details
Users encounter an error where selecting a preserved Document ID for a migrated PDF file fails to find the document in the new SharePoint Online site collection.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- Accessing PDF files using their original Document ID links after migrating files from an on-premises SharePoint environment to SharePoint Online.
- Observed behavior
- Clicking the Document ID link redirects to DocIdRedir.aspx and displays the error message: 'No documents with the ID found in this site collection', despite the file appearing in search and preview.
Verify that the Document ID service is activated in your SharePoint Online Site Collection Features, as newly migrated sites may have this disabled by default.
Use a Custom Column for Legacy Document IDs
Since Document IDs are specific to a site collection, directly copying them during migration may break internal mapping. Creating a custom legacy column ensures original references are maintained without conflicting with the system's new ID generation.
SharePoint Document IDs are generated and resolved exclusively within their specific site collection. When you migrate from an on-premises server to the cloud, the new SharePoint Online environment assigns its own IDs. Forcing old IDs into the new system often breaks the DocIdRedir.aspx redirect logic.
To preserve the validity of legacy links for reference purposes, the safest approach is to store the old ID in a custom metadata column.
Navigate to Site Settings > Site columns. Click 'Create' and set up a new Single line of text column named 'Legacy Document ID'.
Configure your migration tool (e.g., ShareGate) to map the original on-premises Document ID values into this new 'Legacy Document ID' column during the migration process.
Go to Site Settings > Site Collection Features and activate the 'Document ID Service'. Allow SharePoint Online to assign fresh, functional Document IDs to all migrated files.
Instruct users to search for files using the 'Legacy Document ID' if they have an old link, but to use the newly generated SharePoint Online Document ID for all future internal linking.

Test the Document ID Service on a New Site Collection
Determine if the issue is a tenant-wide glitch with the Document ID service or specifically caused by the corrupted mapping of migrated files.
View and Edit Your PDFs Offline with WPS Office
While resolving SharePoint online access and redirection issues, you need a reliable way to access and manage your downloaded files. WPS Office is a completely free, highly compatible alternative to Microsoft Office that allows you to easily view, edit, and manage your PDFs and Office documents directly on your desktop.
- 1. Download WPS Office: Visit the official WPS website to download the free office suite for your operating system.
- 2. Install and Set Up: Run the installer and follow the on-screen instructions to complete the fast setup.
- 3. Open and Edit Files: Set WPS Office as your default application to effortlessly open your downloaded PDFs or Office documents without relying on SharePoint cloud links.

Frequently Asked Questions
Why does DocIdRedir.aspx return a 'not found' error for migrated files?
Document IDs are intrinsically linked to the site collection where they are generated. When you migrate files to a new SharePoint Online site collection, the old ID numbers no longer map to the new database architecture, causing the redirection page (DocIdRedir.aspx) to fail.
Can I keep my old Document IDs exactly as they were after migrating to SharePoint Online?
Technically, the system will generate new IDs for the new site collection. To 'keep' your old IDs, you must map the original ID data into a custom 'Legacy ID' column during migration rather than trying to overwrite the system's built-in Document ID property.
How long does it take for SharePoint to assign Document IDs to newly uploaded files?
Once the Document ID Service is activated, SharePoint uses a timer job to assign IDs. This typically takes anywhere from a few minutes to up to 24 hours depending on the server load and the number of files in the library.
How do I turn on Document IDs in a new SharePoint Online site?
Go to Site Settings (the gear icon) > Site Information > View all site settings. Under Site Collection Administration, click on 'Site collection features' and click 'Activate' next to the Document ID Service.




