HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

Live Lookup Active Directory - search sub org's


I have the Live Lookup working but it only searches users the specified OU ($dn =)

How can I have this script search sub org units or OU’s?



Correction: it is searching sub org OU=staff,DC=domain,DC=local and any sub org such as OU=office,OU=staff,DC=domain,DC=local.

But I need it to search:
OU=staff,DC=domain,DC=local and OU=students,DC=domain,DC=local.

I tried $dn = DC=domain,DC=local but the search fails.


One way to do this is actually to run 2 searches against AD and then merge the results before making your Live Lookup return xml. It should be possible to search both, but this is actually an outside library that does that in the example and I’m not as familiar with how to pass it both to search. Take a look at the adLDAP library that I assume you’re using and see if there’s anything in there that may help. I’ll also give it a look and update if I find anything useful.


Thanks for the reply. Later I did create two searches and it works great. I think I like keeping them separated for now. As a school district it’s kind of nice controlling the search between staff and students. I will look into combining them as you mention.

Thanks again.


Ah great! Yes, I generally like the idea of keeping the searches separate as well. Cheers.