Hi All,
I'm getting an ERROR trying to run the findUsers() to get more than 500 users
When I run he app for the first time it gives me all the users, but in the next calls it return with an error:
Error: Client network socket disconnected before secure TLS connection was established
at connResetException (internal/errors.js:613:14)
at TLSSocket.onConnectEnd (_tls_wrap.js:1532:19)
at Object.onceWrapper (events.js:421:28)
at TLSSocket.emit (events.js:327:22)
at TLSSocket.EventEmitter.emit (domain.js:485:12)
at endReadableNT (_stream_readable.js:1201:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
code: 'ECONNRESET',
path: undefined,
host: 'XX.XXX.XX.XXX',
port: XXX,
localAddress: undefined
}
this is the code part:
const AD = require('activedirectory2').promiseWrapper
const config = { url: 'ldaps://XX.XXX.XX.XXX:XXX',
baseDN: 'DC=XXXXXX,DC=XXXXX',
username: 'dardo.luna',
password: 'xxxxxxxxx',
}
const ad = new AD(config)
var opts = {
scope: 'sub',
filter: '(&(objectCategory=User)(objectCategory=Person))',
}
const results = await ad.findUsers(opts, true)
Tried the authenticate method and authenticates correctly
But don't know what I'm doing wrong here in the find users part
Please help
Thanks!
Hi All,
I'm getting an ERROR trying to run the findUsers() to get more than 500 users
When I run he app for the first time it gives me all the users, but in the next calls it return with an error:
Error: Client network socket disconnected before secure TLS connection was established
at connResetException (internal/errors.js:613:14)
at TLSSocket.onConnectEnd (_tls_wrap.js:1532:19)
at Object.onceWrapper (events.js:421:28)
at TLSSocket.emit (events.js:327:22)
at TLSSocket.EventEmitter.emit (domain.js:485:12)
at endReadableNT (_stream_readable.js:1201:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
code: 'ECONNRESET',
path: undefined,
host: 'XX.XXX.XX.XXX',
port: XXX,
localAddress: undefined
}
this is the code part:
const AD = require('activedirectory2').promiseWrapper
const config = { url: 'ldaps://XX.XXX.XX.XXX:XXX',
baseDN: 'DC=XXXXXX,DC=XXXXX',
username: 'dardo.luna',
password: 'xxxxxxxxx',
}
const ad = new AD(config)
Tried the authenticate method and authenticates correctly
But don't know what I'm doing wrong here in the find users part
Please help
Thanks!