Validate Windows Authentication

Below mentioned two lines of code will help you to validate windows user id from your NAV perspective. Cheers all!!, keep exploring the enormous possibilities with DotNet variable.

PrincipalContext@1002 : DotNet "'System.DirectoryServices.AccountManagement, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.DirectoryServices.AccountManagement.PrincipalContext";
ContextType@1001 : DotNet "'System.DirectoryServices.AccountManagement, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.DirectoryServices.AccountManagement.ContextType";

PrincipalContext := PrincipalContext.PrincipalContext(ContextType.Domain);
Valid := PrincipalContext.ValidateCredentials(vUserID,vPassword);