Auf Englisch lesen Bearbeiten

Teilen über


Principal.FindByIdentity Method

Definition

Returns a principal object that matches the specified identity value.

Overloads

FindByIdentity(PrincipalContext, String)

Returns a principal object that matches the specified identity value.

FindByIdentity(PrincipalContext, IdentityType, String)

Returns a principal object that matches the specified identity type, and value. This version of the FindByIdentity(PrincipalContext, IdentityType, String) method determines the format of the identity value.

FindByIdentity(PrincipalContext, String)

Source:
Principal.cs
Source:
Principal.cs
Source:
Principal.cs

Returns a principal object that matches the specified identity value.

public static System.DirectoryServices.AccountManagement.Principal FindByIdentity (System.DirectoryServices.AccountManagement.PrincipalContext context, string identityValue);
[System.Security.SecurityCritical]
public static System.DirectoryServices.AccountManagement.Principal FindByIdentity (System.DirectoryServices.AccountManagement.PrincipalContext context, string identityValue);

Parameters

context
PrincipalContext

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

identityValue
String

The identity of the principal. This parameter can be any format that is contained in the IdentityType enumeration.

Returns

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

Attributes

Exceptions

Multiple principal objects matching the current object were found.

Applies to

.NET 9 (package-provided) und andere Versionen
Produkt Versionen
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

FindByIdentity(PrincipalContext, IdentityType, String)

Source:
Principal.cs
Source:
Principal.cs
Source:
Principal.cs

Returns a principal object that matches the specified identity type, and value. This version of the FindByIdentity(PrincipalContext, IdentityType, String) method determines the format of the identity value.

public static System.DirectoryServices.AccountManagement.Principal FindByIdentity (System.DirectoryServices.AccountManagement.PrincipalContext context, System.DirectoryServices.AccountManagement.IdentityType identityType, string identityValue);
[System.Security.SecurityCritical]
public static System.DirectoryServices.AccountManagement.Principal FindByIdentity (System.DirectoryServices.AccountManagement.PrincipalContext context, System.DirectoryServices.AccountManagement.IdentityType identityType, string identityValue);

Parameters

context
PrincipalContext

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

identityType
IdentityType

An IdentityType enumeration value that specifies the format of the identityValue parameter.

identityValue
String

The identity of the principal. This parameter can be any format that is contained in the IdentityType enumeration.

Returns

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

Attributes

Exceptions

Multiple principal objects matching the current object were found.

The identity type is not a valid IdentityType enumeration value.

Applies to

.NET 9 (package-provided) und andere Versionen
Produkt Versionen
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)