Connection string to connect to Active Directory using LDAP

前端 未结 4 1020
不知归路
不知归路 2020-12-17 04:56

my system admin gave me this:

Domain : capp.net USER : capp\\dhr2

Pass : admin@12345

what will the connection string be?

I am very very new t

4条回答
  •  既然无缘
    2020-12-17 05:29

    For Active Directory, the ldap connection string can take this form:

    protocol://domaindnsaddress

    where protocol can be either ldap:// or ldaps://, depending on whether to use standard or SSL connection. You should always troubleshoot using standard connection before moving to SSL/TLS to avoid certificate issues at this point.

    domaindnsaddress is DNS-resolvable address of your domain - in your case capp.net .

    Some programming languages, like php, do not require the ldap:// prefix to perform a connect operation. You may try connecting without it as well.

    The username to log in can have several forms. The most common are:

    • NetBIOS domain name\samaccountname ( CAPP\dhr2 - note the BACKslash )
    • userprincipanname ( dhr2@capp.net )
    • samaccountname@domaindnsname ( dhr2@capp.net )

    You can read Microsoft's extensive information about the possible forms of your logon name here:
    MSDN - Simple Authentication

    Password does not need any special treatment - just perform the standard bind operation against your ldap server and you should be authenticated.
    Please note that I am intentionally not including any sample code as your question was about the connection string, not about connecting to ldap using C# libraries.

提交回复
热议问题