
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
ldap-ts-client
Advanced tools
LDAP Client to do low level promise base interaction with ldap server
npm i ldap-ts-clientimport { IClientConfig, LdapClient } from "ldap-ts-client";
const config: IClientConfig = {
url: "ldap://Domain.com" /** Domain name here */,
bindDN: "{USER_NAME}" /** user name to connect to AD server */,
secret: "{PASSWORD}" /** password for account */,
baseDN: "{ROOT_OF_TREE}" /** root of tree that want to query */,
};
const client = new LdapClient(config);
// do something with functionalities
// always free-Up after you done the job!
client.unbind();
for full API documentation look at API Website
/** get displayName of all users */
const users = await client.queryAttributes({
options: {
filter:
"(&(|(objectClass=user)(objectClass=person))(!(objectClass=computer))(!(objectClass=group)))",
attributes: ["displayName"],
scope: "sub",
paged: true,
},
});
// always unbind after finish the operation to prevent memory leak
client.unbind();
/** get displayName and distinguished name of empty groups */
const groups = await client.query({
options: {
filter: "(&(objectClass=group)(!(member=*)))",
attributes: ["displayName", "dn"],
scope: "sub",
paged: true,
},
});
// always unbind after finish the operation to prevent memory leak
client.unbind();
client.bind().then((client) => {
client.search(this.config.baseDN, opts, (err, res) => {
if (err) {
reject(err);
}
res.on("searchEntry", (entry) => {});
res.on("error", (err) => {});
res.on("end", function (result) {
client.unbind();
});
});
});
FAQs
Type-safe LDAP client written in typescript
The npm package ldap-ts-client receives a total of 25 weekly downloads. As such, ldap-ts-client popularity was classified as not popular.
We found that ldap-ts-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.