Passwords in Active Directory cannot be recovered. They are also not listed in most directories. (eDirectory has a password policy that if you bind as the specified user, then you can get passwords through LDAP extensions)
Some directories may allow you to recover hashed versions, but this is also not the case.
To be cross-platform, itβs best to try to relate to the provided values ββand succeed or fail. In addition, LDAP says that binding with an empty password is actually an anonymous connection, which is likely to be successful, so you need to filter for this case.
Once you are attached to the user, you can look at their group membership (as they usually can see their own) or look at some other attribute, which, if they can read it, means that they have a certain level of rights . (Ie Authorization as well as authentication).
source share