Question

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?

Was it helpful?

Solution 2

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

OTHER TIPS

Look for sAMAccountName in the properties you get back.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top