Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you give me examples of an LDAP connection string for Active Directory?

What would the LDAP connection string for contoso.com be?

What about for test.contoso.com?

Thanks!


1 Answers

You need the servername for where you AD is placed - then the syntax will be like this -

For Contoso.com

LDAP://[ServerName]/dc=contoso,dc=com

For test.contoso.com

LDAP://[ServerName]/dc=test,/dc=contoso,dc=com

I don't know if it's useful for you but here is an example of connecting in a C# application

    DirectoryEntry de = new DirectoryEntry("LDAP://[ServerName]/dc=test,/dc=contoso,dc=com");
    de.Username = "username";
    de.Password = "password";
like image 129
Morten Anderson Avatar answered Nov 18 '25 21:11

Morten Anderson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!