node-activedirectory
node-activedirectory copied to clipboard
How to do a custom filter for uid instead of sAMAccountName
hey, this is working for me, but now we are switching to using a custom filter.
We are using the ad.findUser() method
Instead of this standard filter
filter: '(sAMAccountName={{username}})'
we need this:
filter: '(uid={{username}})'
is that the right way to use a filter with your library? I am guessing that it's not. Please help! thanks
I assume the way to do it would be:
let adconfig = {
url: config.ldap.url,
baseDN: config.ldap.searchBase,
username: config.ldap.bindDn,
password: config.ldap.bindCredentials,
filter: '(uid={{username}})'
};
let ad = new ActiveDirectory(adconfig);