views:

26

answers:

0

For some reason, I cannot authenticate user credentials using LDS for users created in LDS.

My test code is:

        PrincipalContext context = new PrincipalContext(ContextType.ApplicationDirectory, "adlds:50000", "CN=test,DC=test,DC=internal", ContextOptions.Negotiate);

        UserPrincipal user = new UserPrincipal(context);

        user.Enabled = true;
        user.Name = "MyTestUser";
        user.SetPassword("P@ssw0rd1");
        user.GivenName = "ATestUser123";
        user.Surname = "SurnameOf";

        user.Save();

        bool auth = context.ValidateCredentials("MyTestUser", "P@ssw0rd1");

ValidateCredentials is returning false each time.

LDS is running on Server 2008 R2 that is domain joined. I have tried recreating the context, expiring passwords, manually reseting passwords through ADSI, etc.

Any thoughts?