SharePoint UserInfo Table Population Tool

In a previous post I spoke about how importance of pre-populating SharePoint’s Content Database’s UserInfo table with users for landing/root (and/or very popular) sites just before a large release of a new SharePoint web application. While I did mention the API you could call to make all this happen I did not provide any tooling. This post is about a small tool I wrote, which at this point has been used with a couple of customers, to pre-populate UserInfo tables.The tool itself comes in two flavors – one for MOSS 2007 and the other for SharePoint 2010 Server. Both flavors allow you to export users from the User Profile Store to a flat file which can then be imported in a manner which populates the UserInfo table. In addition, the SharePoint 2010 version supports both Windows and Claims users.

    SPUserPop SP User Population Tool version for SharePoint 2010
  Started: Friday, 23 September 2011 1:14 PM


  -o, -operation [import|export] Import/export users to/from a file from User Profile Store (Default is import)
  -a, -authtype [windows|claims] Authentication Type (Default is windows)
  -u, -url <site url> Url of site in Content DB to populate or to use as context for export from User Profile Store
  -f, -file <file path> Path to a file which contains users in DOMAINUserName [Windows] or Encoded Claim [Claims] format
  -w, -workers <number> the number of Import worker threads (Default 1) (Max 8)


  SPUserPop -a claims -u http://team -f c:users.txt
  SPUserPop -u http://team -f c:users.txt -w 4
  SPUserPop -o export -u http://team -f usersFromProfileStore.txt


The export operation is pretty strait forward. The command takes a URL to a site collection which will be used to gain access to the context for the source UPA or SSP to be used to to pull user accounts which are then written to a text file with each user account name on a separate line. As you would guess, any file with this format that includes usernames such as DOMAINUsername (for Windows authentication) can be used as input for the import operation.


The import operation is where the pre-population of the UserInfo table takes place. As mentioned previously the import takes a text file which includes the names of the user accounts you wish to populate. It also takes a URL to the site collection as the target to pre-populate. If you have more than one site collection you wish to populate you will need to run the tool multiple times including those site collection URLs you wish to pre-populate. For the SharePoint 2010 version of the tool there is an optionally authentication parameter which is used for when you have claims based user account names. And finally, to allow the program to run as fast as possible there is a worker parameter which will allow you to specific the number of worker threads which will handle the pre-population work. The max value for this parameter is the number of processors on the host machine * 2. Depending on the size of your SQL server, a user’s source domain and domain placement, and the machine running the tool you may want to play around with the worker threads to get the best throughput.

Update [Dec 12th, 2011]

If you plan on running this tool in a least privilege environment the user running this tool needs full control permissions to the UPSA. Being just an Administrator of the UPSA will not be enough to properly execute the tool.

Thanks to Blairb for testing this and reporting back


As with every tool and source code I develop these should be considered ‘as is’, limited support, no warranty, but very interested in feedback.

Tool Download: (160 kb)


Update [Sept 27, 2011]

Just received some performance numbers from a friend of mine that ran this tool at his customer’s site.

  • (Claims) Users exported from User Profile Store: 273,647 users in 13 minutes 35 seconds
  • (Claims) Users populated in SharePoint: 273,317 users in 2 hours 54 minutes 15 seconds 
  • Number of threads used by the tool: 16 threads

2 thoughts on “SharePoint UserInfo Table Population Tool

  1. Hi Todd, looks like a great tool… do I have to run this on my application server to export teh current users in the user profile store?


  2. Hey I am so thrilled I found your webpage SharePoint UserInfo Table Population Tool, I really found you by mistake, while I was searching on Bing for something else, Anyways I am here now and would just like to say thanks for a incredible post and a all round exciting blog (I also love the theme/design), I dont have time to read through it all at the minute but I have book-marked it and also included your RSS feeds, so when I have time I will be back to read much more, Please do keep up the great job.


Comments are closed.