[Fixed]-Django authentication LDAP unable to find user

1👍

Ok,
I found the answer, my AD doesn’t use UID but CN so instead of

AUTH_LDAP_USER_SEARCH = LDAPSearch("cn=Users,dc=domain,dc=local",
ldap.SCOPE_SUBTREE, "(uid=%(user)s)")

I used

AUTH_LDAP_USER_SEARCH = LDAPSearch("cn=Users,dc=domain,dc=local",
ldap.SCOPE_SUBTREE, "(cn=%(user)s)")

Leave a comment