Configure Jupyterhub with Active Directory

Hi There,

I am not able to login to jupyterhub after enabling active directory on it.
Here is the jupyterhub_config.py configurations:

c.LocalAuthenticator.create_system_users = True
c.Authenticator.whitelist = {‘xxxxx’,‘xxxxx’}
c.Authenticator.admin_users = {‘xxxxx’}
c.JupyterHub.authenticator_class = ‘ldapauthenticator.LDAPAuthenticator’
c.LDAPAuthenticator.server_address = ‘ldaps://xx.xx.xx.ae’
c.LDAPAuthenticator.server_port = 636
c.LDAPAuthenticator.lookup_dn = True
c.LDAPAuthenticator.lookup_dn_search_filter = ‘({login_attr}={login})’
c.LDAPAuthenticator.lookup_dn_search_user = ‘xxxxxxx’
c.LDAPAuthenticator.lookup_dn_search_password = ‘**************’
c.LDAPAuthenticator.bind_dn_template = ‘CN={username},OU=xx,OU=xx,OU=xx,DC=xx,DC=xx,DC=xx,DC=ae’
c.LDAPAuthenticator.user_search_base = ‘DC=xx,DC=xx,DC=xx,DC=ae’
c.LDAPAuthenticator.user_attribute = ‘sAMAccountName’
c.LDAPAuthenticator.lookup_dn_user_dn_attribute = ‘DistinguishedName’
c.LDAPAuthenticator.escape_userdn = False
c.LDAPAuthenticator.allowed_groups = [‘CN=xx,OU=xx,OU=xx,OU=xx,DC=xx,DC=xx,DC=xx,DC=ae’]

Here is the error I am getting:
Jupyterhub
JupyterHub app:2120] Using Authenticator: ldapauthenticator.ldapauthenticator.LDAPAuthenticator-1.2.2
JupyterHub app:2120] Using Spawner: jupyterhub.spawner.LocalProcessSpawner-1.0.0
JupyterHub app:1257] Loading cookie_secret from /opt/jupyterhub/jupyterhub_cookie_secret
JupyterHub proxy:460] Generating new CONFIGPROXY_AUTH_TOKEN
JupyterHub app:2337] Hub API listening on //xx.xx.xx:8081/hub/
JupyterHub proxy:645] Starting proxy @ http://:8000
info: [ConfigProxy] Proxying https://*:8000 to (no default)
info: [ConfigProxy] Proxy API at http://127.0.0.1:8001/api/routes
JupyterHub proxy:319] Checking routes
JupyterHub proxy:399] Adding default route for Hub: / =>ip:8081
JupyterHub app:2422] JupyterHub is now running at ://:8000
JupyterHub ldapauthenticator:230] Can’t connect to LDAP
JupyterHub base:670] Failed login for username
JupyterHub log:174] 200 POST /hub/login?next= (@xx.xx.xx.xx) 52.12ms

Can Anyone suggest me the correct configuration to configure jupyterhub with active directory.