I have a function in codeunit as
ValidateCredentials(Domain : Text;Username : Text;Password : Text) : Boolean
UserAccount := UserAccount.PrincipalContext(ContextType.Domain,Domain);
IF UserAccount.ValidateCredentials(Username,Password) THEN BEGIN
User Name and passwords were being authenticated before two days but till now i am not able to login without comment as
ValidateCredentials(Domain : Text;Username : Text;Password : Text) : Boolean
//UserAccount := UserAccount.PrincipalContext(ContextType.Domain,Domain);
//IF UserAccount.ValidateCredentials(Username,Password) THEN BEGIN
please help me to resolve it.
*This post is locked for comments
for usage of .net class PrincipalContext follow
msdn.microsoft.com/.../bb299773.aspx
msdn.microsoft.com/.../bb341016.aspx
you should use constructor PrincipalContext(ContextType.Domain, domainname, userName, password) instead, where username/password is a AD service account/user, which has the right to browse the AD.
Sohail Ahmed
2
mmv
2
Amol Salvi
2