We help IT Professionals succeed at work.

Classic ASP to Query Active Directory Contacts

597 Views
Last Modified: 2014-10-01
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.
Comment
Watch Question

Shaun KlineLead Software Engineer
CERTIFIED EXPERT

Commented:
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
I don't have a way to test this right now but this EE question looks to be on target for what you want to do https://www.experts-exchange.com/Programming/Languages/Scripting/ASP/Q_23325902.html
Web Ninja at large
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.