AD Integration: No entry found for user when looking up attribute 'sAMAccountName'

I am facing issue in configuring ldap authentication with AD integration and I get error while logging in. Below is my config file.

c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator'

c.LDAPAuthenticator.server_address = '<ip>'
c.LDAPAuthenticator.server_port = 389
c.LDAPAuthenticator.use_ssl = False
c.LDAPAuthenticator.allowed_groups = []

#set up the template which used to bind the user from ldap directory
#c.LDAPAuthenticator.bind_dn_template = ["uid={username},ou=Admin,ou=Groups,dc=example,dc=com"]

#Active Directory Integration
c.LDAPAuthenticator.lookup_dn = True
c.LDAPAuthenticator.lookup_dn_search_filter = '({login_attr}={login})'
c.LDAPAuthenticator.lookup_dn_search_user = ''
c.LDAPAuthenticator.lookup_dn_search_password = 'redact'
c.LDAPAuthenticator.user_search_base = 'ou=Admin,ou=Groups,dc=example,dc=com'
c.LDAPAuthenticator.user_attribute = 'sAMAccountName'
c.LDAPAuthenticator.lookup_dn_user_dn_attribute = 'cn'
c.LDAPAuthenticator.escape_userdn = False
c.LDAPAuthenticator.bind_dn_template = '{username}'

While logging to jupyterhub with my user I get below error.

[W 2021-03-18 05:02:18.675 JupyterHub ldapauthenticator:275] No entry found for user 'testuser' when looking up attribute 'sAMAccountName'
[W 2021-03-18 05:02:18.675 JupyterHub base:713] Failed login for testuser



Tried different combinations in configuring the parameters but the error remains the same.
c.LDAPAuthenticator.lookup_dn_search_user is the ldap account that I have mentioned. Is it the correct way?
Any suggestions please.

Seeing the same thing in 2022.

Samba 4 AD Domain Controller

(jupyterhub) camgian@enigma-one:/camgian/conda_envs/jupyterhub$ conda list | grep jupyter
# packages in environment at /camgian/conda_envs/jupyterhub:
jupyter-server            1.13.5                   pypi_0    pypi
jupyter-telemetry         0.1.0                    pypi_0    pypi
jupyter_client            7.2.2           py310h06a4308_0
jupyter_core              4.10.0          py310h06a4308_0
jupyter_server            1.13.5             pyhd3eb1b0_0
jupyter_telemetry         0.1.0              pyhd8ed1ab_1    conda-forge
jupyterhub                2.3.0                    pypi_0    pypi
jupyterhub-base           2.3.0              pyhd8ed1ab_0    conda-forge
jupyterhub-ldapauthenticator 1.3.2                    pypi_0    pypi
jupyterlab                3.3.2                    pypi_0    pypi
jupyterlab-pygments       0.1.2                    pypi_0    pypi
jupyterlab_pygments       0.1.2                      py_0
jupyterlab_server         2.12.0          py310h06a4308_0

[D 2022-05-25 16:50:39.583 JupyterHub ldapauthenticator:256] Looking up user with:
search_base = ‘dc=cm,dc=c*****n,dc=com’
search_filter = '(sAMAccountName=c
attributes = ‘sAMAccountName’
[W 2022-05-25 16:50:39.585 JupyterHub ldapauthenticator:275] No entry found for user ‘c#######s’ when looking up attribute ‘sAMAccountName’
[W 2022-05-25 16:50:39.585 JupyterHub base:822] Failed login for c#######s
[I 2022-05-25 16:50:39.586 JupyterHub log:189] 200 POST /hub/login?next=%2Fhub%2F (@XXX.XXX.XXX.86) 211.62ms

type or paste code here