How do I get a query of all users in an Active Directory domain via LDAP?
The <cfldap> tag allows for easy access to LDAP (Lightweight Directory Access Protocol) services, such as Active Directory. It enables you to harness its power with little effort, other than learning the filter commands needed to communicate with it:
<cfldap action="query" name="QueryUsers"
filter="(&(objectCategory=Person)(objectClass=User))"
attributes="cn,displayname,memberof" start="dc=domain,dc=local"
scope="subtree" sort="cn" server="#LdapServer#"
username="#LdapUser#" password="#LdapPassword#">
<cfoutput query="QueryUsers">
#displayname#<br
</cfoutput>
+