--- id: msldap version: "0.5.15" license: unclear license_treatment: permissive maintenance: aging --- # msldap — Python library to play with MS LDAP License: permissive · Maintenance: aging · Downloads: 78.6K/mo ## What it is and what it does msldap is a library for programmatic interaction with Microsoft Active Directory through LDAP. It abstracts away the complexity of LDAP protocol details and AD-specific authentication schemes, letting you query users, groups, computers, and other directory objects with minimal boilerplate. The library supports a wide range of authentication methods—NTLM (password or hash), Kerberos (with multiple key types), SSPI (Windows-native), and anonymous/simple bind—all configured through a single connection URL string. It also includes a built-in interactive LDAP console for ad-hoc queries and supports SOCKS5 proxying for remote AD access. The package depends on cryptographic and authentication libraries (unicrypto, asyauth, asysocks, asn1crypto) and UI helpers (prompt-toolkit, tqdm, tabulate) to handle the complexity of AD protocols and provide a polished command-line experience. It's designed as a library first, though it ships a command-line tool for interactive use. The codebase is stable but aging, with no formal test suite, so production use should be informed by your own validation. Use it for: - Enumerate users, groups, and computers in an Active Directory domain for security auditing or inventory purposes. - Authenticate to AD-integrated services programmatically using NTLM or Kerberos without external dependencies. - Query AD for certificate templates, certificate authorities, or other security-relevant objects. - Perform AD reconnaissance through a SOCKS5 proxy when direct access to the domain controller is restricted. - Build custom AD management or reporting tools that need to read directory data without relying on Windows-only APIs. - Integrate AD queries into penetration testing or security research workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. msldap is a Python library for querying and interacting with Microsoft Active Directory via LDAP, supporting multiple authentication methods including NTLM, Kerberos, SSPI, and anonymous bind. Yes, if you need to query or authenticate against Microsoft Active Directory from Python and want a lightweight, flexible library with support for multiple auth schemes. The permissive MIT license and low install friction make it accessible. However, be aware that maintenance is aging (last release 446 days old), there is no formal test suite, and LDAPS certificate verification is incomplete—so validate thoroughly before using in security-critical production systems. For one-off AD queries or integration into security tools, it's a solid choice. ## Install pip install msldap uv add msldap poetry add msldap ## Installing msldap Before you install: Low install friction with a pure-Python wheel distribution. Maintenance is aging—last commit was 2026-02-11 and the latest release 446 days old—but the repository remains active and unarchived with modest community interest (498 stars). License in practice: Licensed under MIT (permissive), so you can use, modify, and distribute the library freely in both open-source and commercial projects without restriction. Quickstart: pip install msldap from msldap import MSLDAPClient # Create a client with a connection URL client = MSLDAPClient('ldap+ntlm-password://DOMAIN\\user:password@10.0.0.1') # Query AD for users, groups, or other objects Requires Python 3.7 or later. For Kerberos authentication, the domain controller IP must be specified via the 'dc' parameter in the connection URL. Verify before relying: - Whether LDAPS certificate verification is actually implemented (description notes 'TODO: actually verify certificate'). - Current test coverage and stability guarantees (description explicitly states 'No testing suite'). - Whether all advertised authentication methods (especially Kerberos variants) are equally mature and production-ready. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 78.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags active directory ldap client, ms ad query library, ldap authentication ntlm kerberos, windows domain controller queries, ldap socks5 proxy support, asn1 ldap protocol, interactive ldap console, active-directory, ldap-client, kerberos-ntlm [View on SkillFed](https://skillfed.io/packages/msldap) · [View on PyPI](https://pypi.org/project/msldap/)