Last post Sep 18, 2016 04:57 PM by rds80
Sep 15, 2016 03:43 AM|rds80|LINK
I'm trying to understand how to implement single sign on (SSO) using Active Directory. And I was going thru the code from this link (https://auth0.com/blog/using-ldap-with-c-sharp/)
public bool validateUserByBind(string username, string password)
bool result = true;
var credentials = new NetworkCredential(username, password);
var serverId = new LdapDirectoryIdentifier(connection.SessionOptions.HostName);
var conn = new LdapConnection(serverId, credentials);
result = false;
How do you pass the password to this method? From what I understand you can't retrieve that from Active Directory?
Thanks for the help!
Sep 16, 2016 11:39 AM|PatriceSc|LINK
My understanding is that it tries to connect to ldap using credentials (and so it should work if the password is correct and fail otherwise). You likely have better ways to do this now with newer namespaces (requires 4.x or plus) or the AD provider.
Also from a quick read it seems this article is NOT about SSO but that just tells that accessing LDAP might be used for SSO? For now it looks rather using LDAP with basic authentication.
Sep 18, 2016 04:57 PM|rds80|LINK
Do you know of any examples that use the AD provider to do SSO?