?
Solved

LDAP Query ; Exchange 2007

Posted on 2008-09-30
3
Medium Priority
?
932 Views
Last Modified: 2012-05-05
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
0
Comment
Question by:sny23vpb
  • 2
3 Comments
 
LVL 71

Expert Comment

by:Chris Dent
ID: 22613305

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
0
 

Author Comment

by:sny23vpb
ID: 22641727
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;
0
 

Accepted Solution

by:
sny23vpb earned 0 total points
ID: 22744315
I ended up just making two passes to the ldap for each condition in the 'or' statement. Thanks for everyones help.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Stellar Exchange Toolkit: this 5 in 1 toolkit comes loaded with mega-software tool. Here’s an introduction to tools’ usage and advantages:
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question