Link to home
Start Free TrialLog in
Avatar of sny23vpb
sny23vpb

asked on

LDAP Query ; Exchange 2007

I am trying to take the following query which is working  in an old vb6 application:

"Select Adspath from 'LDAP://domain/DC=domain,DC=com' where samAccountName='ADGROUP1'"

and get it to take into account multiple AD Group entries like this:

" Select Adspath from 'LDAP://domain/DC=domain,DC=com' where samAccountName='ADGROUP1' or samAccountName='ADGROUP2'"

I've tried multiple syntax changes using what I've seen to be LDAP query methodology; but have been unsuccessful.  Any help would be greatly appreciated.

Thank you
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image


Hey,

You might have more luck with a traditional LDAP filter:

(|(sAMAccountName=ADGroup1)(sAMAccountName=ADGroup2))

Where | represents the Or.

Or is that something you've already tried?

Chris
Avatar of sny23vpb
sny23vpb

ASKER

Would that look like  :

 Select Adspath from 'LDAP://domain/DC=domain,DC=com' where (|(sAMAccountName=ADGroup1)(sAMAccountName=ADGroup2))

I tried that syntax with no luck.
Thank you for your help; I'm not accustomed to writing LDAP queries;
ASKER CERTIFIED SOLUTION
Avatar of sny23vpb
sny23vpb

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial