PrincipalContext csharp example

Code Example - PrincipalContext csharp example

                
                        PrincipalContext ctx = new PrincipalContext(contextType, domainname, username,password);
    
            UserPrincipal user = UserPrincipal.FindByIdentity(ctx, userName);