Tamir
Tamir

Reputation: 3901

Active Directory get users in role

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?

Upvotes: 1

Views: 854

Answers (2)

Tamir
Tamir

Reputation: 3901

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

Upvotes: 0

Martin
Martin

Reputation: 6015

Look for sAMAccountName in the properties you get back.

Upvotes: 1

Related Questions