
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
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
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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.