I need to implement authentication using Active Directory for my Winforms application.
I know that it is possible to get current Windows user credential like this:
AppDomain currentDomain = AppDomain.CurrentDomain;
// Set the principal policy to WindowsPrincipal.
currentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
But I need that system asks user to either:
- select logged in credentials => this would be possible with PrincipalPolicy.WindowsPrincipal I guess
- choose to enter different credentials in Windows login form (not in my application) => how can I get this working?
P.S. I know it is possible to send username/password like it is described here: Validate a username and password against Active Directory? but I don't want to have user credentials going through my application because off security risks
I found out also this project in CodeProject.com on how to authenticate against Active Directory
using LDAP
, but this also requires entering user credentials in my application...
I know that there is also Active Directory Federated Services, but as far as I know it is for Web based authentication...
Any solutions for desktop authentication against Active Directory?