Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Find Users ERROR #90

@DardoJav

Description

@DardoJav

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions