I have got my AD set up with Sharepoint 2010, but I need to display a list of all users in the AD as a list of contacts. How do I go about doing this?



Have you configured User Profile Sync to setup user profiles for your AD users or do you need to query AD directly? When you say you want to display a list of contacts, do you just want a page that displays something like a staff list, or do you really want contacts.

If you want real contacts (for outlook sync etc), then I agree with Wictor that BCS is the way to go.

If you have setup UPS and have user profiles in SharePoint for the users you want to display you have a few choices:

  • Custom web part that uses the server object model to iterate over user profiles
  • DataFormWebPart and custom XSLT against the User Profile web service (no code)
  • Use the out-of-box search web parts with a people search scope and custom XSLT (no code)
  • JavaScript/Ajax to with the User Profile web service

For my money, if you have UPS configured and just want a staff list kind of page, I would probably go with using the Search web parts and some custom XSLT.

  • I'm having problems with my UPS, it gets stuck on "Starting" and then fails. Our systems admin is going to add permissions to the user account that is running the service and I should get it up and running tomorrow. I think once that's done, I'll go for option 2, or maybe 4...
    – Kyle
    Sep 8 '11 at 12:11
  • Hmm. Apparently not. I am really losing my mind as to why the UPS won't provision. I've googled thousands of times, even followed spencer's guide to the letter and it STILL won't start. I have my ULS logs if that helps. I've checked SQL Server 2008 Manager and it creates the 3 databases. The login and schema are both set to dbo and nothing. The user account has active directory replication... Here are my ULS logs. pastebin.com/4hBqWGv3 Help. :( ReplyQ
    – Kyle
    Sep 12 '11 at 10:08
  • Kyle - please open another question related to issues with UPS. This is not the same issue as the original question and site rules are 1 question per thread. Sep 15 '11 at 3:19

You could create a custom connector/.NET connector for BCS and leverage AD as an external list. BCS also allows you to set the entities of the list as Contacts, which allows nice sync with Outlook (for instance).

  • Thanks for your answer, but I am a relative novice and am unsure as how to do this. I understand I can go into SPD and create a new external content type on the site, or would it be done as a web part?
    – Kyle
    Aug 22 '11 at 9:50
  • No you can't use SharePoint Designer for this. You need to create a custom connector or .net connector using Visual Studio for this to work. Aug 22 '11 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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