We use sharepoint, and in SP we have a people picker which searches on samaccountname but also on name. On dev it works fine, but on prod it returns sometimes duplicated results.
I wonder if there is an easy application there which I can make queries against the AD and see the results. (Maybe the duplicated users are really in different domains in one ad forest or something.
I found this, but it doesnt have a working example in c#
http://msdn.microsoft.com/en-us/library/ms973834.aspx
I’ve got two snippets for this :
Of course, it needs two references (System.DirectoryServices and System.DirectoryServices.AccountManagement).