Reputation: 56
Using the DirectorySearcher we can specify which properties can be loaded when searching in the AD.
DirectorySearcher dsLookForDomain = new DirectorySearcher(deBase);
dsLookForDomain.PropertiesToLoad.Add("msDS-PrincipalName");
I'm interested in loading msDS-PrincipalName property. Is this possible?
Upvotes: 1
Views: 238
Reputation: 56
I'm not sure if this is going to help anynone but I found an alternative to the msDS-PrincipalName.
userPrincipal.Sid.Translate(typeof (NTAccount)).ToString()
This will return the same thing the property mentioned above does which is: DOMAIN\Username
Upvotes: 1