gheeres / node-activedirectory

ActiveDirectory is an Node.js ldapjs client for authN (authentication) and authZ (authorization) for Microsoft Active Directory with range retrieval support for large Active Directory installations.
MIT License
534 stars 146 forks source link

ERR_SSL_UNSAFE_LEGACY_RENEGOTIATION_DISABLED #248

Open mck-rahul-sadaphal opened 1 year ago

mck-rahul-sadaphal commented 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()