I have tried to use the following code to retrieve the Lotus user detail by Node.js.
let ActiveDirectory = require('activedirectory');
let config = {
attributes:{user: ["*"]},
url: 'ldap://mylotusdominoserver',
baseDN: 'OU=myOU,O=myOrg',
}
let ad = new ActiveDirectory(config);
ad.authenticate(user, password, function (err, auth) {
if (err) {
console.log('ERROR0: ' + JSON.stringify(err));
return;
}
if (auth) {
console.log('Authenticated!');
let query = "&(objectClass=*)(CN=Amy*)";
ad.find(query, (err, results) => {
if ((err) || (!results)) {
console.log('ERROR1: ' + err);
return;
}
console.log(results.other[0]);
});
}
else {
console.log('Authentication failed!');
}
});
It returns:
Authenticated!
{
dn: 'CN=Amy Tomson,OU=myOU,O=myOrg',
mail: 'amyt@myOU.myOrg',
sn: 'Amy',
cn: 'Amy Tomson'
objectclass: [Array],
givenname: 'Amy',
uid: 'amyt@myOU.myOrg',
maildomain: 'myOrg'
}
However, the return attributes do not include the working title of the user, I have added the following attributes to force the server to return all attributes of the user.
attributes:{user: ["*"]},
However, it does not work. My Lotus Note Domino Server version is 9.0.
Is it possible to fix it?