# AD LDAP Connector on Azure VM: Cannot bind to LDAP

**URL:** <https://community.auth0.com/t/ad-ldap-connector-on-azure-vm-cannot-bind-to-ldap/7960>\
**Category:** Get Help\
**Tags:** ldap, azure, ad-connector\
**Created:** [August 24, 2017, 12:31pm UTC](https://community.auth0.com/t/ad-ldap-connector-on-azure-vm-cannot-bind-to-ldap/7960 "2017-08-24T12:31:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jng](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jng](https://community.auth0.com/u/jng)\
**Post date:** [August 24, 2017, 12:31pm UTC](https://community.auth0.com/t/ad-ldap-connector-on-azure-vm-cannot-bind-to-ldap/7960/1 "2017-08-24T12:31:46Z")

</div>

I’m trying to test the AD LDAP Connector and have followed (mostly) the instructions here: [https://auth0.com/docs/connector/test-dc](https://auth0.com/docs/connector/test-dc)

The only difference is that I created a Windows Server 2016 Dataserver VM instead of Windows Server 2012 R2 VM. I also used the GUI interface to promote to a domain controller. (Using the Powershell method, I kept having a NetBIOS prerequisite failure.)

I then installed the connector following this : [https://auth0.com/docs/connector/install](https://auth0.com/docs/connector/install) as well as [Set Up AD/LDAP Connector Test Environment - Auth0 Docs](https://auth0.com/docs/connector/test-dc).

In the Configurations tab of my [http://localhost:8357/ldap](http://localhost:8357/ldap), but configuration log says:

- Testing TCP connection to LDAP server on port: 389: OK  
-Testing LDAP bind to LDAP server: Not OK

Along with the error message “Cannot bind to LDAP”

I’ve tried checking the Username/Password (using mydomain\myadministrator as well as using the ldap querystring?), but I can’t figure out what I’m missing or have done wrong. What else can I check/verify?

---

<div class="post-metadata">

**Author:** ![jng](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jng](https://community.auth0.com/u/jng)\
**Post date:** [August 24, 2017, 3:10pm UTC](https://community.auth0.com/t/ad-ldap-connector-on-azure-vm-cannot-bind-to-ldap/7960/2 "2017-08-24T15:10:57Z")

</div>

After digging around, apparently, the Username should not be \ but rather the proper ldap query (e.g. CN=(user),CN=(group),DC=(domaincomponent),DC=(domaincomponent)

I manage to get the correct string from my Active Directory Administrator Center \> (domain) \> Users. And for the user I wanted, Properties, under Extensions \> Attribute Editor \> distinguishedName.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:56am UTC](https://community.auth0.com/t/ad-ldap-connector-on-azure-vm-cannot-bind-to-ldap/7960/3 "2018-03-02T05:56:06Z")

</div>


