SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have some 30,000 user profiles . We'd like to build a custom list with lookup for Department from a unique list of departments in our User profiles.


Was thinking of buildin a new nightly interface to extract (using .NET and SP Object model) all departments and load unique departments into a new table.

Any easier way?

share|improve this question

Unfortunately the only "official" way to get that information is to cycle through every user profile to get the information and write to a custom database or SharePoint list. The object model surrounding the user profiles is not very useful for collecting large amounts of information and you should not query the profile database directly in SQL.

share|improve this answer

The UserProfileManager class allows you to retrieve all the information from the AD users in SharePoint - This could be moved to a custom list within the site.

Then create a custom timer job in the Farm to deploy the logic and schedule the job to run daily.

share|improve this answer

You might want to consider using script on the EditProfile page to augment the Department column. You can then store the values virtually anywhere and either read them from a list with SharePoint's Web Services (see my SPServices jQuery library) or using AJAX from another source.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.