How can you find a user in active directory from C#? -
How to find C # from AD, how do "users, contacts and groups search" work? I'm trying to know, in Active Directory Users and Computer Tools, I have a string in which there is either a group name, or user's name (usually the first name in the format middleinitial [if they have one], but not always ). Even if I do a different query for groups vs users, I can not run a way to search that most user accounts capture. Find users, contacts, and group tools bring them back almost all the time Does anyone have a suggestion?
I already know how to use the DirectorySearcher class, the issue is that I can not find a query that I like. Neither the CN nor the name of the SMS is nothing in the name of the user, so I am unable to search on them. Finding things and sn and givenName will not catch as much of the equipment as you can.
Are you at Net 3.5? If so - Edie has great features in the new features - see Ethan Villanski and Joe Kaplan in this article.
One of the major new features is the "PrincipalShetter" class that makes it easy to find users, and group / or group in AD.
If you can not use .NET 3.5, the one thing that can make your life easier is called "ambiguous name resolution", and this is a little specialized search filter that just I will search in
finder.filter = string.format ("(and (object category = additionally, I recommend filtering on the" object Caribbean "attribute, because it is the default form of AD Only valuable and sequential from Method, which is much faster than using the "object class". Mark
Comments
Post a Comment