Change "name" to "givenName" in your LDAP filter.

In AD, "name" refers to the unique identifier, for an object, such as
"sAMAccountName". 

M!ke

-----Original Message-----
From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 26, 2006 9:05 AM
To: CF-Talk
Subject: RE: Coldfusion and Active Directory

Hi Mike

I have just tried a simple example and I am recieving no results ? Any
ideas why from my code below?  Not getting any errors?


---- Form Page  -----

<cfform method="POST" action="cfldap1.cfm"> 
 
<cfinput type="text" name="givenName" size=22 ><br>
 
<input type="image" src="search.gif" border="0" style="cursor:hand"
width="49" height="18">
</cfform>


---cfldap1.cfm page ----------------

<cfldap action="query"
name="adresult"
attributes="givenName"
start="cn=users,dc=neath-porttalbot,dc=gov.uk"
scope="subtree"
filter="(&(objectclass=user)(name=#form.givenName#))"
server="server"
port="389"
Username="username"
Password="password"
>
</head>
<body>

<cfoutput query="adresult">
Name : #givenname#
<br>
<br>
<hr>
<br>
</cfoutput>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230498
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to