How to Configure Document ID Service Feature in SharePoint Online?

What is Document ID Service in SharePoint Online?

The Document ID service in SharePoint Online automatically generates and assigns a unique number to each document, which can be used to locate that document anywhere within the site collection, even if it’s moved or copied to a different location. Once the uploaded document gets a unique number, a URL is also formed by this unique ID. So, we can use it to quickly find a document within the SharePoint Online site collection even when the document is moved to another location within the same site collection, as the document ID and URL properties of the document don’t change.

How to Configure Document ID Feature in SharePoint Online?

The Document ID Service is a feature that needs to be activated in SharePoint to provide unique IDs to documents in a site collection. To configure the Document ID Service, We have to activate the document ID feature. Here is how to activate the document ID in SharePoint Online:

  1. Navigate to the site collection Root >> Click on the “Settings” icon >> Site Information >> View all site settings.
  2. On the Site Settings page, under the Site Collection Administration section, click on “Site Collection Features”. 
  3. Locate and click on the “Activate” button for “Document ID Service”. Wait for a button labeled “Active” to appear next to it.
    activate document id feature sharepoint online
  4. Now, go to the site settings page again, click on the “Document ID Settings” link from the Site Collection Administration section.
    document id feature in sharepoint online
  5. On the Document ID Settings page, To enable auto-generated IDs, select the “Assign Document IDs” checkbox. Set the characters to use as a prefix for document IDs and the search scope for locating documents by ID. The prefix should be between 4 and 12 characters with no special character.
    document id service feature sharepoint online
  6. To apply the new prefix to existing documents in the site collection, select the “Reset all Document IDs in this site collection, to begin with, these characters” checkbox.
  7. Click on the OK button to save the Document ID settings. Now, any document created or uploaded to this site collection will be assigned a unique ID that is prefixed with the text “Mark-“
Wait! You might not immediately see document IDs associated with your documents. Although the feature has been activated, the process of assigning ID’s to documents is completed by an automated timer job in SharePoint Online which is out of our control! It took an hour for me.

Display the “Document ID” column on a Document Library

SharePoint Online stores the ID as part of a document’s metadata. You can also add the “Document ID” column to the document library’s view. Here is how: Once the “Document ID service” feature is activated:

  1. Navigate to any document library >> Click on Views drop-down menu >> choose “Edit Current View”.
    add document id column sharepoint online
  2. Check the box next to the “Document ID” column, and set the order, and click OK.
    sharepoint online get document id

Now, You’ll see the “Document ID” column appears with its assigned unique ID in your library!

enable document id service sharepoint online

SharePoint Online: Get Document ID

The document ID is viewable on the document properties page, along with any other standard document properties. Just navigate to the document library, Right-click on any document, choose “Properties”, and you’ll see the document ID value in the properties pane!

sharepoint online turn on document id

URL to Get Document By Its Document ID

Also, the document with the document ID assigned can be accessed regardless of its location with URL:<DocumentID>, e.g.,, which takes us to the document directly! You can obtain this URL by Right-clicking on the “Document ID” value in the details pane, and choosing “Copy link location” from the browser’s context menu!

Last but not least: SharePoint Online maps the document IDs with a managed property called “DlcDocId”. So you can use Search to find documents by their document ID as DlcDocId: <DocumentID>. E.g., “DlcDocId:MARK-1265375246-1”

To activate the document ID service in SharePoint Online using PowerShell, use: SharePoint Online: Enable Document ID Service using PowerShell


In conclusion, The Document ID feature in SharePoint Online is a way to assign a unique identifier to each document in a library. This feature is a useful tool for organizing and easily accessing documents in a library. By activating the feature and configuring the Document ID format, each document in the library is assigned a unique identifier that can be used to quickly locate and access the document, even if it’s moved or copied to a different location.

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

7 thoughts on “How to Configure Document ID Service Feature in SharePoint Online?

  • Is there a way to copy the document ID link from the list view rather than having to open up the details pane?

  • Hi,
    If I enable version history in the document library, then searching via document id shows all the available versions of a particular document. Is there a way to copy just the latest document version using document id feature on the UI?

    Thank you!

  • Is this an editable link to share? If not, can we add the ?web=1 thing at the end to produce an editable link based on permissions like we can with the regular link to the file?

    We are struggling at the moment to run automation on library files without workflows failing when metadata is trying to be updated for status values, approval information etc.

    We have resorted to lists to create a “tracker” for each document added to a library. But, we add an editable link in a text and use json to convert it to hyperlinks for quick access for the user. If they move the files though, the links obviously breaks. We need the editable link where they can open the document and it’s in edit document mode if they have the level of permissions to edit the document, not the link to the document that just downloads it.

  • Can I create a column that generates a link by placing the Document ID into the URL? If so, how do I go about it?

    • I would like to know the answer to this question as well. Would be a game-changer!

      • You mean like calculated column? Formula for calculated column (SP Online): `=””&[Document ID Value]`

  • Hi Salaudeen,
    Is it possible to configure a document id number to restart each year? E.g.: ABC-23-00001 for the first doc this year and ABC-24-00001 for the first doc next year?


Leave a Reply

Your email address will not be published. Required fields are marked *