...
Array<object> $Domain.ExecuteLdapQuery(rootDnOrHost: string, attributes: string, filter: string, username: string, password: string)
...
Attributes to return. Optional.
string filter
Filter of search. Optional.
string username
Username to authenticate. Optional.
...
Before calling this method, LDAP connection settings must be configured in the application settings.
Example
Code Block | ||
---|---|---|
| ||
var entries = $Domain.ExecuteLdapQuery('dc=example,dc=com', 'cn,mail', '(&(objectClass=user)(cn=*))'); for (var i = 0; i < entries.length; i++) { console.log(entries[i].cn + ' - ' + entries[i].mail); } ` |