I get the members of a AD group, but instead of the user name, im getting the display name. How can i get the user name?
there is no such property when i get group object.There is "member" which is the display name with some additional details.
Tamir
2009-06-17 13:10:56
A:
Well, i think this might be impossible, as the only users related property is the "members". So as a workaround i used the DirectoryService with the "member" property value to fetch the user again from the AD and get it's sAMAaccoundName. I'll be happy to hear about another solution to save the call to the AD for each user except the first call. Thanks
Tamir
2009-06-17 13:39:39
Perhaps if you search active directory for users with memberOf = 'dn of group' you can get the sAMAccountName directly? Maybe it requires two searches because you are searching for the group first, and looking at the member property of the group (which is only the dn of each user).
Martin
2009-06-19 01:30:57