This project was intended as research into integration with Active Directory in C#. It currently supports multi-user search, and editing, deleting, and saving of individual users.
Note that it is no longer maintained, and a dll is missing that I don’t have access to anymore. I’m leaving the code available for reference.
The program will attempt to connect to the AD server at startup, so you’ll have to edit the configuration before running. Make sure that you supply:
- Server name or IP
- Username/password for a user with the rights to edit the AD store
- The path to the AD container that you want to edit/view
Note that, by default, new objects will be created in the root container, so make sure that you configure that correctly.
This module encapsulates the connection to the AD server. It also handles some of the common activities performed over that connection. It accepts and returns either strings, or types from the DirectoryServices.AccountManagement library.
ADObject contains a set of wrappers for the AccountManagement types. This was an attempt to create a simpler, more unified interface for Active Directory objects. As they currently exist, the AccountManagement interface uses a mix of string parameters and function calls to get and set various fields of the AD item. ADObject handles all the necessary function calls, exposing only string parameters, or List<String> parameters. This simplifies interaction with other classes, such as BindingSource, thus enabling very easy UI development.
Note that values stored in an ADObject are only stored locally until Save() is called!
ADObject depends on ActiveDirectory.cs for the direct interface to the server.
If it isn’t already, try setting the AD server as your secondary DNS.
Make sure that you have the correct ADContainer in the configuration.
The program Active Directory Explorer is incredibly helpful in setting up connections to Active Directory. Connect using AD Explorer, find your desired container, and copy the Path it displays. Then paste this into the app config.