Subscribe via RSS Feed Connect with me on LinkedIn

Document ID Feature

[ 6 ] April 28, 2010 |

Business Issue

Many clients complained that MOSS document management suffered from two features which were inexcusable:

  1. Lack of unique identifiers for documents: This is really important in any Document Management System, in particular in Records Management
  2. URL’s to documents containing location information: If you have a look at MOSS/WSS document URL’s they contained a location, move a document to any different location and you lose the link! This is a major shortcoming in an ECM system as we are now forced to look for documents based on location, rather than on metadata.

Many people asked for unique numbering in documents and content within SharePoint 2007, now this all comes out of the box in SP 2010! In addition you can also create your own DocumentID by overriding the DocumentIDProvider abstract class so you can have whatever format of Document ID’s that you like! What this means is that now SharePoint offers the following:

  1. Unique numbering for documents which you can format in any way
  2. You can now store documents in any location and they will still be able to be referenced by the original URL that it is assigned.
  3. From an compliance, Records Management and Document Management perspective this ensure a unique identifier that can trace the document, through the entire DM lifecycle.
  4. Documents keep their original ID across Sites, Site Collections and even Web Applications.

Business Value

Potentially huge! The Document ID services fixes a whole bunch of issues related to ECM but in terms of business value :

  1. Time and cost savings from users having to look for documents when incorrect URL’s are sent
  2. Integration into a existing unique numbering system is now possible, great news for clients that are using existing DM systems
  3. Intelligent numbering. This offers up some really interesting possibilities into creating unique identifiers that actually have information stored about the document contained within the id.


  1. ONLY content types that are derived from the Document Content Type will have unique ID’s enabled, no list items will get id’s assigned :evil:


So first things first, to enable the Document ID Feature enable it from Site Collection Features as seen below. When this is done you will see a new option under ‘Site Settings -> Site Collection Administration‘ called Document ID Settings. When you click on this you will see the following options available

Assign Document IDs

  • Assign Document ID’s: You click this and all existing documents and new documents will get an ID. This does rely on a timer service to run so it can take a little while (the timer service located in Central Admin is called the ‘ Document ID Assignment Job’
  • Begin ID’s with the following characters: This is the 4-12 document ID that you can configure. All that SharePoint will do is add a “- number” to the end of this like -1,-2 and so forth. If you don’t like this then you will have to write your own provider (see below)

Document ID Look Up Search Scope

  • Use this search scope for ID Lookup: This is really cool. You can create a scope and then if a user enters in a document ID then it will directly open up instead of going to the results page. There are however some extra steps with this that I will post!

Now if you view a document you see the following added to the Properties: Now instead of a location based URL there is a link to /_layouts/DocIDRedir.aspx with the document ID at the end!

Creating your own Provider

If you don’t particularly like the way that SharePoint increments the unique id (which is actually adding 1 to the end) then you can always create your own. To do this you need to do the following: 1) Create a class that derives from Microsoft.Office.DocumentManagement.DocumentIdProvider which is listed below

namespace Microsoft.Office.DocumentManagement {
public abstract class DocumentIdProvider {
protected DocumentIdProvider();
public abstract bool DoCustomSearchBeforeDefaultSearch { get; }
public abstract string GenerateDocumentId(SPListItem listItem);
public abstract string[] GetDocumentUrlsById(SPSite site, string documentId);
public abstract string GetSampleDocumentIdText(SPSite site); } }

2) Register the provider by using any of these methods since I couldn’t find (and neither could Michel Berneveld who wrote  a great article about this, see below) a stsadm or powershell command which sort of sucks.

public static void SetDefaultProvider(SPSite site);
public static void SetProvider(SPSite site, Type providerType);

Timer Jobs

In addition when you enable the service there is a couple of timer jobs that are created as seen below:

Document ID Assignment Job: The Assignment job will assign Document ID to existing content. Remember that even if you don’t have unique ID’s associated to documents within a Site Collection you can always retroactively assign these id’s which is great news. Can I hear the chorus of clapping particulary from those users who are migrating from 2007 to 2010 J

Document ID enable/disable: This timer jobs creates the Document ID column in the Document libraries.


Tags: , ,

Category: General, Planning, Requirements and Analysis

About Michal Pisarek: Michal Pisarek is the founder of Dynamic Owl Consulting and a Microsoft SharePoint MVP. View author profile.

Comments (6)

Trackback URL | Comments RSS Feed

  1. […] For more information there is a more detailed article that I have written here. […]

  2. Rogier says:

    As far as I have tested, this is not true for a webapplication:
    4.Documents keep their original ID across Sites, Site Collections and even Web Applications

  3. Mike says:

    Same content copied and posted at by someone else.

  4. Ashish says:

    Hi Michal,

    Is there any means where by which i can tag the Document ID produced by SharePoint to the file as a file property?

    I want to implement a solution for my organisation such that people can check the unique ID of a file locally on the users machine.


  5. David says:

    We have not been able to persist the Document IDs across site collections let alone web applications. Has anyone been able to make this work?

Leave a Reply

If you want a picture to show with your comment, go get a Gravatar.