Open akkitech opened 4 years ago
Did you solve this?
@KevinBeckers following syntax solved my problem:
ad.findUser("cn=akshay,cn=testContainer,cn=admin,dc=ec2,dc=internal", function(err, user) {
if (err) {
console.log('ERROR: ' +JSON.stringify(err));
return;
}
if (! user) console.log('User not found');
else console.log(JSON.stringify(user));
});
you could also pass username@domain.com in the first parameter
I am using node js activedirectory module for AD authentication and fetching users & groups. Able to authenticate successfully but unable to get users & groups using .findUser(), .findUsers(), .findGroups() methods. I've added few users and a group using ADSI editor in windows 10. Any clue what could be going wrong?
Screenshot of ADSI Editor :
Code :
Output :
Authenticated! User: not found.