I\'ve been pulling my hair out trying to send a request to update my own password via a script. here is the code:
#!/usr/bin/python3.5
from ldap3 import Server,
ldap3.modify_password() as of version 0.9.4.2 doesn't work with Active Directory, because it uses the Password Modify Extended Operation, which isn't supported by AD. MS found a way to do things different with AD, it seems. The ldap3 author (cannatag) was aware of this and added ad_modify_password() shortly after. You'll have to use a newer release of ldap3.