Principal.FindByIdentityWithType Method (PrincipalContext, Type, IdentityType, String)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Returns a principal object that matches the specified identity type, and value. This method is called by the implementation of the derived-class FindByIdentity method to restrict the search to the derived class type and is not intended to be called directly from your code.

Namespace:   System.DirectoryServices.AccountManagement
Assembly:  System.DirectoryServices.AccountManagement (in System.DirectoryServices.AccountManagement.dll)

protected static Principal FindByIdentityWithType(
	PrincipalContext context,
	Type principalType,
	IdentityType identityType,
	string identityValue


Type: System.DirectoryServices.AccountManagement.PrincipalContext

The PrincipalContext that specifies the server or domain against which operations are performed.

Type: System.Type

The type of object for which results are returned. This must of type Principal or a type derived from the Principal class.

Type: System.DirectoryServices.AccountManagement.IdentityType

An IdentityType enumeration value that specifies the type of the identity value.

Type: System.String

The identity of the principal.

Return Value

Type: System.DirectoryServices.AccountManagement.Principal

A Principal object that matches the specified identity value and type or null if no matches are found.

.NET Framework
Available since 3.5
Return to top