Here is a link to information about optimizing and profiling ldap queries to
AD:
http://robbieallen.com/downloads/RAllen_LDAP_Searching.ppt

On Fri, Oct 31, 2008 at 11:25 AM, Burns, John D <[EMAIL PROTECTED]> wrote:

> I have a query of a SQL table that returns to me a bunch of usernames.
> From that, I need to query some information out of Active Directory for
> each user. Right now I have it looping over each row in the result from
> the SQL query and doing a separate LDAP query to the AD. This just
> doesn't seem like the best way to do things. Does anyone know if there's
> a syntax within LDAP querying of the AD to do something like an IN
> keyword where I could give the whole list of usernames I want to query
> and get a single result set back from one query instead of doing
> individual queries? There's no commonality amongst the user accounts in
> the AD except for the fact that their usernames are all in this external
> SQL table. Let me know if you have any ideas. Or maybe the single LDAP
> queries aren't as intensive as bad as what I'm thinking. I just know I
> always try to avoid multiple queries in SQL whenever possible. Here's
> the syntax I'm using now when querying the AD:
>
>    <cfldap action="QUERY"
>       name="GetEmployeeIDByUsername"
>       attributes="cn,displayName,givenName,extensionAttribute1"
>       start="dc=domain,dc=com"
>       scope="subtree"
>       filter="(&(objectCategory=Person)(cn=#myQuery.username#))"
>       server="domaincontroller.mydomain.com"
>       username="#ADUsername#"
>       password="#ADPassword#">
>
> Thanks in advance for any help.
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314681
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to