Updated 5 days ago

How to Activate Document ID Service in SharePoint Online

by AIMA

7 min read

No Comments

In SharePoint, it’s common for files to move from one folder or library to another as teams reorganize their content. But each time a file is moved, its URL changes, and anyone using the old link ends up with a broken one. This often leads to confusion and repeated link sharing.

Another similar challenge comes from SharePoint allowing identical file names across libraries in the same site. When multiple files share the same name, it becomes increasingly difficult to figure out which one is the correct file.

To handle these challenges more reliably, SharePoint has a long-standing feature called the Document ID Service. In this blog, let’s look at how this feature helps you create permanent, stable links and uniquely identify documents, even when files move.

What is Document ID in SharePoint?

The Document ID Service was first introduced as a site collection feature in SharePoint Server 2010 as a way to assign a unique, static ID to every document. SharePoint Online later carried this feature forward almost unchanged. In modern SharePoint, each site you create is treated as an individual site collection. This means you activate and configure the Document ID Service per site, depending on where you need it. There’s no option to turn it on at the tenant level.

With Document IDs, you can keep track of a file no matter where it goes. For example, if a contract is moved from one library of a site to another, you can still locate it using its Document ID. This is because the unique file ID changes from site to site, but the Document ID stays consistent no matter where the file is moved within the organization. Once enabled, the Document ID Service brings several useful capabilities like:

  • Assigns a permanent ID to every document.
  • Keeps the ID even if the file is moved or renamed.
  • Lets you retrieve a file using a static URL regardless of its path.
  • Helps differentiate files with identical names. You can have 20 files named Contract.pdf — each still has a different Document ID.
  • Supports tenant-wide search using the ID.

Note: The Document ID Service assigns IDs only to documents and Document Sets. It does not generate Document IDs for SharePoint lists.

Document ID vs. Unique ID in SharePoint

Many admins confuse SharePoint’s Document ID with the Unique ID, but these two serve very different purposes:

Feature Unique ID (GUID) Document ID
Definition A globally unique identifier assigned at creation to the item/file object itself. A user-friendly, permanent identifier generated by a service to track a document regardless of its location.
Type GUID Human-readable ID
Who assigns it? SharePoint backend Document ID Service
Visibility Hidden (API/URL) Visible in UI
Changes when moved? Yes, if moved to different site Depends on whether Document ID Service is enabled in the destination site.
Purpose Identify the file object for APIs Provide permanent linking across sites
Used for PowerShell, Graph, workflows End-user linking, document management
Format Long GUID string Prefix–random–number format

Document ID vs Unique ID

How to Configure Document ID Service in SharePoint Online?

You must be a SharePoint Online site collection administrator to configure the Document ID Service. Once the prerequisite is in place, follow the steps below:

How to Activate the Document ID Service in SharePoint Online

Follow these steps to turn on the Document ID Service:

  1. Open the SharePoint site where you want to enable the feature.
  2. Click the gear icon in the top-right corner and select Site contents.
  3. On the Site Contents page, click Site settings.
  4. Under the Site Collection Administration, select Site collection features.

5. Find Document ID Service and click Activate.

After activation, the feature status will update to show Active along with a Deactivate button, confirming that the service has been successfully enabled.

How to Configure Document ID Settings in SharePoint

Once the feature is activated, you can configure its settings.

  1. Go to the Site Settings page.
  2. Under Site Collection Administration, you will now see a new option called Document ID Settings.

3. This opens the Document ID Settings page, where you can manage options such as assigning Document IDs and configuring the Document ID lookup search scope.

4. Assign Document IDs: When this box is checked, all documents in the site collection will automatically get a Document ID. If unchecked, existing documents that already have IDs will keep them, but no new IDs will be assigned.

  • Begin IDs with the following characters: The prefix is just the starting string of the Document ID. SharePoint generates a default prefix automatically. However, you can replace this with a custom 4–12 character prefix to better organize or differentiate your site collections. If you set the prefix to FINC, your document IDs might look like: FINC-1234567890
  • Reset all Document IDs: If you are setting the prefix, select this option to update all existing documents so their IDs use the new prefix format.
    • The message, “Configuration of the Document ID feature is scheduled to be completed by an automated process,” means that SharePoint will run a background timer job to assign Document IDs to existing documents. This may take some time depending on the number of files in the site collection.
  • Document ID Lookup Search Scope: Choose the scope for looking up documents by their Document IDs.

Once you are done configuring the settings, click Ok to save your configurations.

Add the Document ID Column in the Library

Now that Document IDs are being assigned, the next step is to make them visible in your document library. To do this,

  1. Open the library where you want to display the Document ID.
  2. From the All Documents dropdown, select Edit current view.

3. From the list of available columns, check Document ID (linked to document) and then click OK to save the view.

Now, the Document ID column will appear in the library view. For existing documents, the IDs will appear once the background job finishes assigning them.

Confirm Document ID Assignment in the Library

To check whether the Document ID feature works, let’s upload a document to the library. You’ll see that a Document ID is automatically assigned.

Known Behavior of Document ID Feature

When Moving a File:

When you move a file to another site, two things can happen:

If the Document ID Service is enabled in the destination site:

  • SharePoint can retain the ID properly.
  • If the destination site uses a different prefix, only the prefix changes — the ID portion remains the same.
  • The permanent link continues to work.

If the Document ID Service is not enabled in the destination site:

  • The original Document ID is removed.
  • The file becomes a normal document without an ID.
  • The permanent link breaks.

How Copying Files Affects Document IDs in SharePoint

Copying behaves differently from moving. Unlike moving a file within SharePoint, copying a file to another library, site, or using ‘Copy to’ is treated as creating a new document.

  • The copied file receives a new Document ID (if the destination site has the feature enabled).
  • If the destination site doesn’t have the feature enabled, the copied file won’t get a Document ID.
  • Permanent links created using the original Document ID will break.

In the image below, you can see that when documents were copied from one library to another, they received new Document IDs, and the prefix was updated based on the destination site’s configuration.

Testing the Document ID Feature

Let’s now test the practical use of the Document ID feature:

Case 1: Moving from one library to another library within the same site

I moved the document “FinanceReports.docx” from one library to another library within the same site. After the move, I checked its details, and the Document ID remained unchanged.

Document ID Service

Case 2: Moving from one site to another site where Document ID is enabled

Next, I moved the same document to a library in a different site where the Document ID feature is enabled. Once again, the Document ID persisted without any changes.

This persistence means that the document can always be tracked or referenced by its Document ID, no matter where it resides within SharePoint. I even renamed the file in the site, and still the Document ID remained the same.

Document ID Service

Case 3: Moving from one site to another site where Document ID feature is not activated

Finally, I tested moving the document from the site Teamss123 to Project Management, where the Document ID feature is disabled.

Document ID Service

We can see that the Document ID was lost after the move.

These tests clearly show that Document IDs stay consistent across moves and renames, but only if the target site has the Document ID feature enabled.

Benefits of Document IDs in SharePoint

  • Static URL Access:

Documents with assigned Document IDs can be accessed directly using a static URL format:

This URL will always redirect to the document, regardless of its current location. Be sure to update tenant name in the URL.

  • Searching by Document ID:

SharePoint Online indexes Document IDs using a managed property called DlcDocId. This allows you to search for documents by their ID. For example:

DlcDocId: FINANCE-1573505547-6466

This ensures that even if a document moves across libraries or sites, it remains easily discoverable via search.

That’s it! We hope this blog will give you a clear understanding of how the Document ID feature works in SharePoint Online. Thanks for reading. If you have any questions, feel free to drop them in the comments section.

Share article