Last post Jul 15, 2016 09:57 AM by Chris Zhao
Jul 14, 2016 08:31 PM|Harish kakani|LINK
We are pulling user related information from Active Directory (AD) using C#.AD properties names are added as ENUMS, based on type of properties being searched in AD we are using this ENUMS in switch case to generate filters.
EX: Enum Name, Location, Job Title
Return Name Filter.
Return Location Filter.
Case Job Title:
Return Job Title Filter.
If at all we want to query against new AD properties, we need to add those properties to ENUM and should be included in switch case showing in above example.
Solution we think of:
Configuring ENUM values in XML file and changing/adding them when ever needed, but we see lot of coding effort in that activity.
Storing this values into database table whenever required and programming application to read from database.
All the above mentioned solutions are custom solutions. We just want to make sure if there any concept with .net to achieve above mentioned task.
Jul 15, 2016 09:57 AM|Chris Zhao|LINK
You could use
System.DirectoryServices to Search the Active Directory. See
A collection of the most common Active Directory Tasks in C#.
#Quick List for C# Code Examples