ActiveDirectoryService Class


Service layer for working with Active Directory.

public static class ActiveDirectoryService
System.Object → ActiveDirectoryService


Authenticate(string, string, string) Connects to the server and returns a value that specifies if the credentials are valid.
GetMembers(PrincipalContext, IdentityType, string, bool) Get the members of the specified role. When the recursive flag is set to true, this method searches the specified role recursively and returns all nested role members.
GetPrincipalContext(string, string, string) Gets a container that is used as the base of all operations against the ActiveDirectory.
GetRole(PrincipalContext, IdentityType, string) Returns a Role from Active Directory.
GetRoles(PrincipalContext, IdentityType, string) Get the list of roles of which the specified user is a member.
GetUser(PrincipalContext, IdentityType, string) Returns a User from Active Directory.
GetUserByEmail(PrincipalContext, string) Returns a User from Active Directory.
SearchGroups(PrincipalContext, string, int, int) Returns a paged list of Role objects from Active Directory.
SearchUsers(PrincipalContext, string, int, int) Returns a paged list of User objects from Active Directory.