How to Enable Document ID Feature in SharePoint Online

Document ID feature helps you effectively manage and track your documents by assigning unique Id to every document. Once you activated the Document ID service in the SharePoint Online site, a unique number (Document ID) will be automatically assigned to each document uploaded to the SharePoint site.

We can easily locate and find the documents in the site library using this unique ID. The documents also get a permanent URL with this unique ID. So, the URL will not be changed when the document is moved to another location within the same site collection since the document keeps the same ID. 

If you are a programmer or scripting guy, you might have checked the document’s other id property UniqueId. The Unique ID is the default property, and it is unique to a specific list/library whereas the Document ID property is unique to the entire site collection. The Document ID will also move with the file when we move (not copy) the file to another site collection if the Document ID service is already enabled in the destination site.

Note: You must be a Site Collection Administrator to enable the Document ID feature in SPO.

Summary

How to Activate and Configure the Document ID feature in site collection

Follow the below steps to activate the Document ID Service in a SharePoint Online site collection. 

  • From the document library or site collection root, click the Gear Icon (Settings icon) on the top-right and select Site information.
  • Click on View all site settings.
Steps to Activate and Configure the Document ID feature in site collection
  • On the Site Settings page, under Site Collection Administration, click Site collection features.
Steps to Activate and Configure the Document ID feature in site collection
  • Scroll down to Document ID Service and click on the Activate button. Wait for a few seconds to activate, A button labeled Active appears after the service is activated. 
Steps to Activate the Document ID service feature in site collection
  • Go back to the Site Settings page, under Site Collection Administration, click Document ID settings.
Steps to Configure the Document ID feature in site collection
  • In the Document ID settings page, make sure the checkbox Assign Document IDs is checked. Under label Begin IDs with…, you can assign a custom prefix for the document IDs. The prefix is the custom string of characters or numbers that are automatically appended to the beginning of each Document ID. The prefix is an alphanumeric value (no special characters) between 4 and 12 characters.
  • Select the Reset all Document IDs… check box if you want to automatically apply the new prefix to existing documents in your site collection.
Steps to Configure the Document ID feature in site collection
  • Click OK to save the settings. 
  • If you enabled the feature for the first time within a site collection or if you selected the option to assign IDs with a new prefix to existing documents, a background timer job will be scheduled to update IDs in all documents. There’s no way to find how long SharePoint will take to assign IDs to the existing documents, hopefully, it will finish within a day. While the background job progresses, any document created or uploaded to any document library in the site receives a unique document ID with the new prefix.

Add and View the Document ID column in Document Library

Once you successfully activate the Document ID service by following the above steps, a background job will be triggered to automatically update ID in existing documents. The new document created or uploaded in the library immediately receives the document ID. Follow the below steps to add and display the Document ID column in the document library’s current view.

  • Navigate to the document library, click on View options, and select Edit current view.
Add and View the Document ID column in Document Library
  • In the Edit View page, under the Columns section, scroll down and check the box next to the Document ID column. To specify the order of the columns, select a number in the Position from left box. Click the OK button to save the changes in the current view.
Add and View the Document ID column in Document Library
  • You can now view the Document ID column in the library and the assigned ID value will be displayed for the documents.
  • If you just now enabled the feature, you might see the empty value in the Document ID column for some or all documents. There is a background timer job that will be triggered to update IDs and you may need to wait up to 24 hours to populate ID values for the existing documents. You can create or upload a new document to view the ID immediately.

View and Get SharePoint File URL with Document ID

You can view the Document ID from the document properties details pane. The property value will be displayed as a hyperlink which includes the Document ID URL. You can copy the URL and use it to open the document in Office Online.

  • Navigate to the document library, select the required document, and click on the Info icon to open the Details pane (Refer to the below image).
  • Scroll down and look the Document ID field, right-click on the hyperlink value and click the Copy link option to copy the URL.       
View and Get SharePoint File URL with Document ID

The document URL link will be in the following form. So, you can just replace the ID part with another document’s ID and use it to open the file.  

https://contoso.sharepoint.com/sites/SiteName/_layouts/15/DocIdRedir.aspx?ID=SALESDOC-1382046625-11

Search SharePoint File by using Document ID

In SharePoint Online, the document ID column is mapped with the Managed Property DlcDocId, which helps you to search and find documents by using the command like: “DlcDocId: SALESDOC-123456765432-1”.

 Search command syntax: DlcDocId: <DocumentID>
 E.g. "DlcDocId: SALESDOC-123456765432-1"

You can search from both the Library search box and the Site search box. The below image shows the search result from the Document library search box.

Search SharePoint file by using Document ID from Library

The below image shows the search result from the Site home search box.

Search SharePoint file by using Document ID from Site home

We can also use a wildcard search by using the asterisk (*) around the partial text of the Document ID (ex: DlcDocId: *1362*). The below example searches the document which contains the text “1362” in the document Id.

Find SharePoint file by using Document ID with wildcard search.

Moving files to other site collection with Document ID

As already said, the Document ID property will be the same when we move the file to a different library or subsite within the site collection. 

The ID will also carry with the file when we Move (not copy) the file to another site if the Document ID feature is already activated on the destination site. It will keep the same ID even if a different Document ID prefix is configured on the destination site. In this case, the moved file’s Document ID URL link changed to point to the new site collection.

When moving a file from a site library to another site collection library, you will get the below warning message if the Document ID feature is not activated on the destination site. If you click the Move anyway button, then the file moved to the destination site without the ID.

Moving files to other site collection with a Document ID

We will get the same message if any other metadata column is not configured at the destination site.

The file or folder contains properties that will be lost at the new destination

Advertisement

Leave a Comment