ASP accessing exchange directory

Posted on 1998-03-31
Last Modified: 2013-12-25
I need to create an ASP page that will list my exchange users in tabular format. When the user clicks on someones name then a detail page will come up.

I have tried to modify the find user script which is shipped with the web version of outlook in exchange 5.5 but have had all sorts of problems.

I'm now looking at the possibility of writing something from scratch, maybe using COM or even OLE-DB.

Does any one know how to access the exchange directory from an ASP page ?

Question by:DanielGarcia
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
  • 2

Author Comment

ID: 1858163
Edited text of question

Expert Comment

ID: 1858164
You will have to use CDO (Active Messaging) to access the exhange server and give you the list of all the users for a particular exchnage domain.


Expert Comment

ID: 1858165
You could also use LDAP

Accepted Solution

percyn earned 300 total points
ID: 1858166
Here is an example of how you can use ASP and ADSI. Just modify the search criteria to match your needs.

The code below will find mailboxes in the Exchange directory services whose 'City' property matches the search ‘criteria. The ADSI LDAP name for 'City' property is 'l.'

Dim objADOconn ' ADO connection object
Dim strADOQueryString ' ADO query string
Dim objRS  ' recordset object
Dim strCriteria  ' value used to search the directory tree
strCriteria = "Bellevue"

Set objADOconn = CreateObject("ADODB.Connection")
objADOconn.Provider = "ADSDSOObject"
objADOconn.Open "ADs Provider"
strADOQueryString = "<LDAP://" + strServer + ">;(&(objectClass=organizationalPerson)(l=" + strCriteria + "));cn,adspath;subtree"
Set objRS = objADOconn.Execute(strADOQueryString)
If Not objRS.EOF Then
 While Not objRS.EOF
   objNewDL.Add objRS.Fields(1).Value
  Response.Write objRS.Fields(0) + " added :)<BR>"
  Response.Write "No mailboxes were added to the DL :(<BR>"
End If


Author Comment

ID: 1858167
Thank you very much for your answer. Sorry it took a while to get back to you.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…

730 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