Last Updated on August 19, 2022
Did you know that you can assign an ID to a document in a site collection?
Well, it’s a feature that has existed for a long time. But you need to activate it in order to use it on your site collection.
In this article, I’ll show you how to use the document ID feature in SharePoint so you can track your documents easily.
Let’s get started.
Table of Contents:
What is the document ID feature all about?
From its name, the document ID feature basically assigns IDs to documents in a site collection in SharePoint.
Through the ID, you can effortlessly search for the document wherever it was stored in the site collection.
The system assigns a permanent URL using the same document ID so the URL doesn’t change even if the document was moved to a different location inside the site collection.
Note: Don’t confuse the document ID feature with the item ID feature in SharePoint. The former is automatically generated and doesn’t need to be activated.
Sign up for exclusive updates, tips, and strategies
What are the benefits of using the document ID feature?
The document ID feature has more advantages over the unique ID feature, though there are similarities between the two.
Some of the benefits of using the document ID feature include the following:
- Searchability of the document. You can easily search for a document using its unique document ID — though you will have to input a search parameter first (more on this later). You can’t use a unique ID to search for a document.
- Permanent document URL. Documents get a permanent URL after activating the document ID feature. This means the document’s URL stays the same regardless of where it currently is.
- Unique to the whole site collection. The document ID that a document has is unique to the entire site collection. A document’s unique ID, however, is only unique to that list or library.
How to activate the document ID service?
In contrast with the unique item ID feature, the document ID service has to be activated first before it can run by itself.
Here are the steps to activating the document ID feature:
- Navigate first to the target site collection
- Click the gear icon on the upper-right corner
- Hit the site information link from the options

On the next screen, click the view all site settings link above the delete icon:

On the next page:
- Focus your attention on the site collection administration group
- Click the site collection features link

On the site collection features page:
- Find the document ID service item
- Click the activate button on its right side

You will know when it’s activated since the item will show an active status. The button is also changed to deactivate.
How to assign a prefix to a document ID?
Did you know that you can add a little customization to the document IDs as a whole?
Well, it’s not that grand. But you can add a prefix to each document ID. (By default, the system adds random characters.)
Follow these steps:
- Go back to the site settings page (gear icon > site information > site settings)
- Click the document ID settings link on the site collection administration group

On the next page:
- Change the contents on the prefix field
- Click the OK button to save the changes

After the changes have been saved, all document IDs in the site collection will start with the prefix that you specified.
Note that on this page, you can also:
- Enable or disable the document ID feature
- Reset all the document IDs in the site collection to enable the document ID prefix to propagate
How to show the document ID column in a library?
Through the steps above, the document ID feature is now activated. However, if you wish to show it in the library, you will have to enable its column.
Here are the steps on how to show the document ID column in a document library:
- Navigate to the target document library
- Click the view button from the command bar
- Hit the edit current view option

The system will open a new tab for you with a new page:
- Check the box for the document ID column (in the column list)
- Click the OK button at the top or bottom of the page

When you go back to the document library, you will see the new column shown:

Are you worried because a document isn’t showing a document ID like what you can see above?
Well, changes to the document ID don’t happen instantly as there is a timer in the background that rolls out changes to the document IDs.
You may notice the following:
- Pre-existing documents in the document library may not show a document ID right after you activate the feature.
- New documents may not reflect the new document ID prefix right away.
Give the system around 24 hours to roll out the changes across the site collection.
How to use the document ID feature
Now that you have the document ID feature active, how do you take advantage of it?
Search using the document ID
Well, for starters, you can use the document ID in modern SharePoint to search for a document. But you need to use this syntax:
DlcDocId:DocumentID
I won’t go into details about the specifics of the syntax except that it has something to do with managed properties.
To test it out:

Since the document ID is specific to a document, the search will return the exact document that matches the ID you used.
Note: You have to provide the full, exact document ID for this to work. If it lacks at least one character, the system won’t return any results.
Embed the document ID value
For Word documents, you can also embed the document ID into the file itself so users will be able to find the original copy easily.
To do this:
- Open the document using the Word desktop app
- Go to the insert tab in the ribbon
- Click the quick parts button
- Select document property > document ID value

Move documents to other sites
Using the document ID, you can move a document to another site collection and the document will still have the same document ID.
The only prerequisite is that the document ID feature must be activated on that site collection first (or else the document ID will be lost).
Joanne Klein did a lot of testing about the document ID feature in her post about SharePoint Online and document ID.
Anyway, what do you think about document ID? Will you be using it on your own sites? Please share your thoughts below.
For inquiries and other concerns, kindly use the site’s contact form and I’ll get back to you as soon as possible.
For some reason, the Document ID shows up in my library, but it doesn’t show in Word Quick Parts when I open one of the Word files within the library? Any idea why that might be?