ActiveDirectoryService.GetPrincipalContext Method

Namespace:
Weavy.Core.Services
Assembly:
Weavy.Core.dll

GetPrincipalContext(string, string, string)

Gets a container that is used as the base of all operations against the ActiveDirectory.

public static PrincipalContext GetPrincipalContext(string domain, string username, string password)

Parameters

domain
string

The name of the domain or server.

username
string

The username used to connect to the store. Both username and password must be non-null, and the credentials they specify are used to connect to the store.

password
string

The password used to connect to the store. Both username and password must be non-null, and the credentials they specify are used to connect to the store.

Returns

System.DirectoryServices.AccountManagement.PrincipalContext