GroupPrincipal.FindByIdentity Method

Definition

Returns a group principal object that matches the specified identity value.

Overloads

FindByIdentity(PrincipalContext, String)

Returns a group principal object that matches the specified identity value.

FindByIdentity(PrincipalContext, IdentityType, String)

Returns a group principal object that matches the specified identity type, and value. This version of the FindByIdentity method determines the format of the identity value.

FindByIdentity(PrincipalContext, String)

Source:
Group.cs
Source:
Group.cs
Source:
Group.cs
Source:
Group.cs
Source:
Group.cs

Returns a group principal object that matches the specified identity value.

public:
 static System::DirectoryServices::AccountManagement::GroupPrincipal ^ FindByIdentity(System::DirectoryServices::AccountManagement::PrincipalContext ^ context, System::String ^ identityValue);
public static System.DirectoryServices.AccountManagement.GroupPrincipal FindByIdentity (System.DirectoryServices.AccountManagement.PrincipalContext context, string identityValue);
static member FindByIdentity : System.DirectoryServices.AccountManagement.PrincipalContext * string -> System.DirectoryServices.AccountManagement.GroupPrincipal
Public Shared Function FindByIdentity (context As PrincipalContext, identityValue As String) As GroupPrincipal

Parameters

context
PrincipalContext

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

identityValue
String

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

Returns

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

Exceptions

Multiple group principal objects matching the current group object were found.

Applies to

FindByIdentity(PrincipalContext, IdentityType, String)

Source:
Group.cs
Source:
Group.cs
Source:
Group.cs
Source:
Group.cs
Source:
Group.cs

Returns a group principal object that matches the specified identity type, and value. This version of the FindByIdentity method determines the format of the identity value.

public:
 static System::DirectoryServices::AccountManagement::GroupPrincipal ^ FindByIdentity(System::DirectoryServices::AccountManagement::PrincipalContext ^ context, System::DirectoryServices::AccountManagement::IdentityType identityType, System::String ^ identityValue);
public static System.DirectoryServices.AccountManagement.GroupPrincipal FindByIdentity (System.DirectoryServices.AccountManagement.PrincipalContext context, System.DirectoryServices.AccountManagement.IdentityType identityType, string identityValue);
static member FindByIdentity : System.DirectoryServices.AccountManagement.PrincipalContext * System.DirectoryServices.AccountManagement.IdentityType * string -> System.DirectoryServices.AccountManagement.GroupPrincipal
Public Shared Function FindByIdentity (context As PrincipalContext, identityType As IdentityType, identityValue As String) As GroupPrincipal

Parameters

context
PrincipalContext

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

identityType
IdentityType

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

identityValue
String

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

Returns

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

Exceptions

Multiple group principal objects matching the current group object were found.

The identity value is not a valid IdentityType enumeration value.

Applies to