Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ClaimsPrincipal.FindAll Method

Definition

Namespace:
System.Security.Claims
Assemblies:
mscorlib.dll, System.Security.Claims.dll
Assemblies:
netstandard.dll, System.Security.Claims.dll
Assembly:
System.Security.Claims.dll
Assembly:
mscorlib.dll
Assembly:
netstandard.dll

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Retrieves all of the claims that match a specified condition.

Overloads

Name Description
FindAll(Predicate<Claim>)

Retrieves all of the claims that are matched by the specified predicate.

FindAll(String)

Retrieves all or the claims that have the specified claim type.

FindAll(Predicate<Claim>)

Source:
ClaimsPrincipal.cs
Source:
ClaimsPrincipal.cs
Source:
ClaimsPrincipal.cs
Source:
ClaimsPrincipal.cs
Source:
ClaimsPrincipal.cs

Retrieves all of the claims that are matched by the specified predicate.

public:
 virtual System::Collections::Generic::IEnumerable<System::Security::Claims::Claim ^> ^ FindAll(Predicate<System::Security::Claims::Claim ^> ^ match);
public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> FindAll(Predicate<System.Security.Claims.Claim> match);
abstract member FindAll : Predicate<System.Security.Claims.Claim> -> seq<System.Security.Claims.Claim>
override this.FindAll : Predicate<System.Security.Claims.Claim> -> seq<System.Security.Claims.Claim>
Public Overridable Function FindAll (match As Predicate(Of Claim)) As IEnumerable(Of Claim)

Parameters

match
Predicate<Claim>

The function that performs the matching logic.

Returns

The matching claims.

Exceptions

match is null.

Remarks

Returns claims from all identities associated with the claims principal.

Applies to

FindAll(String)

Source:
ClaimsPrincipal.cs
Source:
ClaimsPrincipal.cs
Source:
ClaimsPrincipal.cs
Source:
ClaimsPrincipal.cs
Source:
ClaimsPrincipal.cs

Retrieves all or the claims that have the specified claim type.

public:
 virtual System::Collections::Generic::IEnumerable<System::Security::Claims::Claim ^> ^ FindAll(System::String ^ type);
public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> FindAll(string type);
abstract member FindAll : string -> seq<System.Security.Claims.Claim>
override this.FindAll : string -> seq<System.Security.Claims.Claim>
Public Overridable Function FindAll (type As String) As IEnumerable(Of Claim)

Parameters

type
String

The claim type against which to match claims.

Returns

The matching claims.

Exceptions

type is null.

Remarks

Returns claims from all identities associated with the claims principal. The comparison is made using Ordinal case in-sensitive on type.

Applies to


Feedback

Was this page helpful?