1
Answer

Active Directory fields list dynamically

jeet p

jeet p

15y
3.7k
1
Hi guys,

can you suggest what should I code - to get the list of Active Directory fields of a given domain?
because in one of my Apps I wrote them static (givenname,telephone etc.) - but in target domain such fields are not there or with new names or with other fields. I want dynamically all the list of fields of AD. Please help 

thanks - jeet
Answers (1)
0
Abdul Qadir

Abdul Qadir

NA 4 0 15y
Use System.DirectoryServices.DirectoryEntry class to load your Domain object. Once your object is resolved from DirectoryEntry, you can look at the schema properties to load the attributes at run time.