How to authenticate user credentials?

  • Thread starter Thread starter Paul Steele
  • Start date Start date
P

Paul Steele

I'm writing a program that needs to authenticate an Active Directory
username/password? The program will be running on a workstation that is not
part of the domain. Any pointers would be appreciated.
 
I solved my own problem. Here's the sample code:

try
{
IADsOpenDSObject user = (IADsOpenDSObject)Utils.GetObject("WinNT:");
user.OpenDSObject("WinNT://ad.acadiau.ca",username,password,
(int)ADS_AUTHENTICATION_ENUM.ADS_SECURE_AUTHENTICATION);
return true;
}
catch
{
return false;
}
 
Back
Top