This post is the fourth in a series of postings, containing examples of SharePoint WebParts that anybody can build all by themselves. To read all posts in this series, or to get started with the RSSBus WebPart, go here.

#4 – List Active Directory Groups and Users
This web part will list each user group and its members, as defined in your Active Directory (or other LDAP server) installation.
Step one is to make sure you have the RSSBus Web Part installed. See here for instructions.
Step two, make sure you have the Ldap Connector installed.
Step two, add the RSSBus WebPart to your page and paste the following template into its source editor, but do not click “Apply” yet.
Step three, we need to modify this template so that it works for your Active Directory server, and not mine! There are several things you’ll need to change:
1. On line 8-10, change the values of the server, authentication dn, and authentication password settings to match your AD installation. See the advanced tip at the bottom of this post to automatically use the logged in user as the authentication dn.
2. On line 13, you’ll want to modify the value of the dn setting to match your domain.
As always, you can customize the html in the template if you want, or leave it as is.
Step four, click “Apply”, and when the page reloads you’ll be presented with a list of the groups on your Active Directory domain. Click on a group to expand it into its list of user members.
And now - an Advanced Tip! Use RSSBus’ special _spuser item in order to get information specific to the currently authenticated SharePoint user. This comes in handy for things like listing documents that were modified by a specific user, authenticating to an Exchange server, and in this example for authenticating to AD. You can set the DN to “[[_spuser.LoginName]]”, and prompt the user to enter their own password.
See all posts in this series: 10 DIY SharePoint Web Parts.
Browse RSSBus Connectors.
Basic RSSBus Scripting Cheat Sheet.