I am using AD LDS to authenticate user. There is one issue I am facing with.
I have the following code to authenticate a user:
PrincipalContext context = new PrincipalContext(ContextType.ApplicationDirectory,xxxx, xxxx, ContextOptions.SimpleBind);
auth = context.ValidateCredentials(userId, CryptoHelper.Decrypt(password), ContextOptions.SimpleBind);
When the password policy from Local Security Policy is disabled the auth returns true, however when I enable it, it returns false.
Also, the auth returns false only for users which are created after enabling the password policy.
Found the issue, when we enable the password policy the msDS-UserAccountDisabled is set to TRUE when we create an user. So in the process of creating the user if we set it to false it will work.