There should be a sample with fnLDAPQuery() you can use.