Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LDAP Exchange

Status
Not open for further replies.

ginoitalo

Programmer
Feb 15, 2003
23
CA
How can I programatically retrieve:
FullName, UserName, E-mail address
from all users on my MS EXCHANGE server "xsrv" ?

LDAP://xsrv/??????????


 

I cannot answer your question fully, but I may be able to add some info you can use.

I have had some exposure to accessing ldap info on an exchage server via php.

I think you will have to use a similar notation to 'o=MySite,ou=MyOrg,ou=Recipients,cn=Useralias'

from that object

firstname = 'givenname'
lastname = 'sn'
email = 'rfc822mailbox'

hope this helps.

 
If you are a CF developer use CFLDAP tag

IF you are an ASP developer, there is a tag by ASPfusion called ADVldap.

Hope this helps
 
I wrote an ASP phonebook that uses W2K LDAP / Exchange 2000. You can take a look at it at:
and click search.
Here is an example of one of the pages:

<%@ Language=VBScript %>
<%
Option Explicit
Dim con,rs,Com,letter,school
%>
<html>
<head>
<style>
.over { background-color: #FFFF66; cursor: hand}
.out { background-color: #CCCCCC}
</style>
</head>
<body topmargin=&quot;0&quot; leftmargin=&quot;0&quot; bgcolor=&quot;#CCCCCC&quot; >
<%
letter = request.queryString(&quot;letter&quot;)
school = request.queryString(&quot;school&quot;)
If letter <> &quot;&quot; Then
Set con = Server.CreateObject(&quot;ADODB.Connection&quot;)
con.provider =&quot;ADsDSOObject&quot;
con.open &quot;Active Directory Provider&quot;
Set Com = CreateObject(&quot;ADODB.Command&quot;)
Set Com.ActiveConnection = con
Com.CommandText =&quot;select name, sAMAccountname from 'LDAP://hs_inst.burlington.org/OU=Staff,OU=Domain Users,DC=burlington,DC=org' WHERE objectCategory='person' AND department='&quot;+school+&quot;' AND sn='&quot;+letter+&quot;*' ORDER BY name&quot;
Set rs = Com.Execute
%>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#CCCCCC&quot;>
<%
Do While Not rs.EOF
%>
<tr><td onMouseOver=&quot;this.className='over'&quot; onMouseOut=&quot;this.className='out'&quot; class=&quot;out&quot; valign=&quot;middle&quot; onclick=&quot;window.open('info.asp?user=<% response.write rs(&quot;sAMAccountname&quot;)%>','InfoFrame');window.open('emailstart.htm','EmailFrame');&quot;><a><b><font color=&quot;#000080&quot; face=&quot;Verdana&quot; size=&quot;2&quot;>
<% response.write rs(&quot;Name&quot;)%></font></b></a></td>
</tr>
<%
rs.MoveNext
Loop
rs.Close
%>
</table>
<%
con.Close
Set rs = Nothing
Set con = Nothing
End If
%>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top