Last post May 22, 2009 02:01 PM by wtroom
May 22, 2009 01:35 PM|antonyliu2002|LINK
I have an asp.net 3.5 web application for our enterprise intranet. I want to let the admin users of this application to dig out users from the AD and add them to the system.
I know how to search an AD through the samaccountname. In other words, given the samaccountname of a user, I can retrieve the other information of this user I need, there are also plenty such examples on the web.
But, I am not sure how to search users in the AD by their first name, and/or last name. I cannot find any example on the web. In other words, if the admin user enters "Johnson" in the search box and hit "Search", I would like to get a list of users whose
names contain "Johnson".
Any hint please? Thanks a lot.
May 22, 2009 02:01 PM|wtroom|LINK
In AD a users first name is the "givenName" field and the "last name" is the sn field. I wrote a post on this regarding how to pull AD information out of SQL. I know this isn't what you're doing but it will show you some filed names in AD along with how
to do it via SQL in case you want to go that route.
Hope this helps - John