Which attribute/property values are available when I query for Active Directory objects when using C# and the .NET PrincipalSearcher class?
Posted: (EET/GMT+2)
In .NET programming, you can search for Active Directory (AD) domain objects using the PrincipalSearcher class, which lives in the System.DirectoryServices.AccountManagement namespace. The searcher returns a collection of DirectoryEntry objects, which contain lots of information about the found objects.
However, the "Properties" property of this object is string-indexed, meaning you must know beforehand, which key values are available. At this point, the question of this post's title says it all: "which attribute/property values are available?"
Luckily, MSDN contains a full list of available properties. Not all objects exhibit all these properties, and likewise, the domain and forest levels (along with operating system versions) affect the amount of information available.
Even so, a complete list is good to have handy. Hope this helps!