troubleshooting Question

Classic ASP to Query Active Directory Contacts

Avatar of guildernet
guildernetFlag for United States of America asked on
Web ApplicationsActive DirectoryASP
3 Comments1 Solution623 ViewsLast Modified:
I have a classic ASP page that I use as a phonebook which queries against Active Directory.

I would like to add another function where it can also query Active Directory for contacts. I have over 100 fax machines that I want users to be able to look up. Our Active Directory Admin create a Contact for each one, and in the last name field called it FAX.

Here is the Query String I'm using to return users in AD and it works fine.

objCom.CommandText ="select name,telephonenumber,mobile,facsimileTelephoneNumber,pager,mail,l,physicalDeliveryOfficeName,company,title,department,sAMAccountName,sn,userAccountControl,msexchhidefromaddresslists FROM 'GC://"+objADsPath+"' where name = '*" & usrname & "*' ORDER BY name "'"
      
I'm assuming a new query string for Contacts should be just as simple but I can not find any reference material to know what object names to be using.
ASKER CERTIFIED SOLUTION
Big Monty
Web Ninja at large

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros