Possible Duplicate:
How can I get DOMAIN\USER from an AD DirectoryEntry?
Here is what I have right now:
DirectoryEntry de = new DirectoryEntry("LDAP://" + domain);
SearchResult result;
DirectorySearcher search = new DirectorySearcher(de);
search.Filter = String.Format("(cn={0})", groupName);
search.PropertiesToLoad.Add("member");
result = search.FindOne();
Note that groupName
(which a parameter passed into the method representing the name of the group to search in) can be a universal group, which means it might contain accounts from other domains.
Which property in the searchresultcollection
should I use to find the domain the account originates from, or even better is there a webpage that has a list of all the properties available to this particular collection?