7

Is it possible to search for multiple user names with a single PrincipalSearcher call. Maybe by providing an 'OR' of the requested user names as the filter criteris ?

Brant Bobby
  • 14,956
  • 14
  • 78
  • 115
user307499
  • 121
  • 1
  • 4

1 Answers1

-1

Yes, it is possible to search for several user names with a simple LDAP query. I am not sure what you are exactly trying to do but you should be able to do something like below

(|(userPrincipalName=userA@domain.com)(userPrincipalName=userB@domain.com))

Julien Jacobs
  • 2,561
  • 1
  • 24
  • 34
  • 1
    Julien, one of the many shortcommings of AccountManagement is that you can't perform your own custom LDAP queries. The query you provided cannot be executed using PrincipalSearcher. You could execute it using DirectorySeracher if DirectoryServices was being used instead of AccountManagement. – Peter Jun 26 '12 at 14:25