{"id":45487,"library":"msldap","title":"msldap","description":"Python library to play with Microsoft LDAP, commonly used in offensive security tooling (e.g., pypykatz). Current version 0.5.15, released irregularly. Requires Python >=3.7.","status":"active","version":"0.5.15","language":"python","source_language":"en","source_url":"https://github.com/skelsec/msldap","tags":["ldap","active-directory","security","ms-ldap"],"install":[{"cmd":"pip install msldap","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"wrong":"from msldap import MSLDAPClient","symbol":"MSLDAPClient","correct":"from msldap import MSLDAPClient"}],"quickstart":{"code":"import asyncio\nfrom msldap import MSLDAPClient\n\nasync def main():\n    client = MSLDAPClient(\n        'ldap://192.168.1.1',\n        'DOMAIN\\\\username',\n        'password'\n    )\n    _, conn = await client.connect()\n    print('Connected successfully')\n    await conn.disconnect()\n\nasyncio.run(main())","lang":"python","description":"Connect to an MS LDAP server using password authentication."},"warnings":[{"fix":"Use 'from msldap import MSLDAPClient' instead.","message":"In v0.5.x, the import path for MSLDAPClient changed. Code using 'from msldap.client import MSLDAPClient' will break.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Wrap calls with asyncio.run() or use await inside async functions.","message":"The library uses asyncio; synchronous wrappers may not exist. Always run in an async context.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'msldap.protocol' instead.","message":"The 'msldap.ldap_objects' submodule is deprecated and may be removed in future versions.","severity":"deprecated","affected_versions":">=0.5.0"}],"env_vars":null,"search_vec":"'0.5.15':19 '3.7':24 'activ':27 'active-directori':26 'common':9 'current':17 'directori':28 'e.g':15 'irregular':21 'ldap':8,25,32 'librari':3 'microsoft':7 'ms':31 'ms-ldap':30 'msldap':1 'offens':12 'play':5 'pypykatz':16 'python':2,23 'releas':20 'requir':22 'secur':13,29 'tool':14 'use':10 'version':18","created_at":"2026-06-07T12:55:15.577719+00:00","updated_at":"2026-06-07T12:55:15.577719+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'MSLDAPClient' from 'msldap' (/tmp/tmp4nu9ymow/venv/lib/python3.12/site-packages/msldap/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/skelsec/msldap","github":"https://github.com/skelsec/msldap","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}