Open mck-rahul-sadaphal opened 1 year ago
While Fetching the ldap url to get the list of users by group name, i am getting above error
const ActiveDirectory = require('activedirectory'); const bluebird = require('bluebird'); const fs = require('fs'); const path = require('path');
const config = { url: "ldaps://abc.com", baseDN: "dc=ads,dc=com", username: "usr, password: "12345" } const cerPath = path.join(__dirname, 'cert.cer') console.log("cerPath => ", cerPath) tlsOptions = { ca: fs.readFileSync(cerPath), // rejectUnauthorized: false }; config.tlsOptions = tlsOptions;
const ads = bluebird.promisifyAll(new ActiveDirectory(config));
async function test() { try { let newlist = await ads.getUsersForGroupAsync("12345678"); console.log(newlist) } catch (error) { console.log(error) } }
test()
While Fetching the ldap url to get the list of users by group name, i am getting above error
const ActiveDirectory = require('activedirectory'); const bluebird = require('bluebird'); const fs = require('fs'); const path = require('path');
const config = { url: "ldaps://abc.com", baseDN: "dc=ads,dc=com", username: "usr, password: "12345" } const cerPath = path.join(__dirname, 'cert.cer') console.log("cerPath => ", cerPath) tlsOptions = { ca: fs.readFileSync(cerPath), // rejectUnauthorized: false }; config.tlsOptions = tlsOptions;
const ads = bluebird.promisifyAll(new ActiveDirectory(config));
async function test() { try { let newlist = await ads.getUsersForGroupAsync("12345678"); console.log(newlist) } catch (error) { console.log(error) } }
test()