I am developing an application that needs to get a list of users in a particular domain on the network. Does anyone have any idea how I should go about doing this?
I am aware of the System.DirectoryServices namespace in C# but I am not sure if that only allows for a single user. Multiple users on multiple computers must be able to see the list of users in the domain.
Basically this is what the application should do:
1. Get a list of users in the domain on the network.
2. Add this list of users into a table in SQL Server.
The whole process involves adding all users in the domain into a table in SQL server so that when the users log on to the network using their windows authenticated credentials they don't have to supply any other username or password to access the database. The application will just look up their current credentials with the ones listed in the SQL Server table, if it finds a match it will allow the user to access the database. So, How am I going to get this list of users in the domain and how will I also be able to get the windows authenticated credentials of the current user accessing the database?
I hope I made my question clear, I'm fairly new to c# and SQL Server. Thanks.