Connect to Active Directory via LDAP

前端 未结 3 1246
花落未央
花落未央 2020-11-28 22:43

I want to connect to our local Active Directory with C#.

I\'ve found this good documentation.

But I really don\'t get how to connect via LDAP.

Can so

3条回答
  •  醉梦人生
    2020-11-28 23:04

    ldapConnection is the server adres: ldap.example.com Ldap.Connection.Path is the path inside the ADS that you like to use insert in LDAP format.

    OU=Your_OU,OU=other_ou,dc=example,dc=com

    You start at the deepest OU working back to the root of the AD, then add dc=X for every domain section until you have everything including the top level domain

    Now i miss a parameter to authenticate, this works the same as the path for the username

    CN=username,OU=users,DC=example,DC=com

    Introduction to LDAP

提交回复
热议问题