Skip to main content
October 9, 2007
Answered

CFLDAP attributes

  • October 9, 2007
  • 3 replies
  • 842 views
How do I query LDAP to check the password from a form? Right now, the code I'm using is...

<cfldap action="query" server="dcmp1.ad.***.com" name="Results" start="DC=ad,DC=***,DC=com" username="***" password="***" scope="subtree"sort="givenname asc"attributes = "SamAccountname,mail,cn">

Also, what is the attributes for the password?
Thanks,
Hans
This topic has been closed for replies.

3 replies

Participating Frequently
October 14, 2007
To answer your original question, you can't retrieve a password from Active Directory.

If you wanted to use CFLDAP to authenticate a user, you just pass the username and password values, from the form, into the CFLDAP tag. If it works, the user is who they say they are. If it fails, then don't consider them to be authenticated.

Wrap the CFLDAP tag with a CFTRY tag to catch any errors.
October 9, 2007
Thank you so much! That worked!
philhCorrect answer
Inspiring
October 9, 2007