I'm testing Azure AD and Azure AD DS and I have some issues to bind to Azure DS using LDAP. I used the default AD tenant in my subscription, so i get a domain foo.onmicrosoft.com. Then I create a ADDS synchronized with this directory.
From a Linux VM, I tried to bind to the AD using ldapsearch and I got "invalid credentials" with the following command
ldapsearch -h <ip> -p 389 -b "dc=foo,dc=onmicrosoft,dc=com" -s sub "(objectclass=)" -D user@foo.onmicrosoft.com*
Then I follow the tutorial to activate LDAPS with an autosigned certificate. With the following ldapsearch command, I got the error "ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)"
ldapsearch -H ldaps://foo.onmicrosoft.com -b "dc=foo,dc=onmicrosoft,dc=com" -D user@foo.onmicrosoft.com
Am I using the good base DN ? And the good bind user syntax ? It doesn't work either when using cn=user,dc=foo,dc=onmicrosoft,dc=com
Is LDAPS mandatory ? Should I use the AD DS IP addresses (10.x.x.x) or the Secure LDAP external IP addresses (20.x.x.x) ?
Thanks