?
Solved

LDAP Query ; Exchange 2007

Posted on 2008-09-30
3
Medium Priority
?
921 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
To show how to generate a certificate request 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 >> Certificates…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
Suggested Courses

777 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