Share via


UserManager<TUser>.AddClaimsAsync Method

Definition

Adds the specified claims to the user.

public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ AddClaimsAsync(TUser user, System::Collections::Generic::IEnumerable<System::Security::Claims::Claim ^> ^ claims);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> AddClaimsAsync (TUser user, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims);
abstract member AddClaimsAsync : 'User * seq<System.Security.Claims.Claim> -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.AddClaimsAsync : 'User * seq<System.Security.Claims.Claim> -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function AddClaimsAsync (user As TUser, claims As IEnumerable(Of Claim)) As Task(Of IdentityResult)

Parameters

user
TUser

The user to add the claim to.

claims
IEnumerable<Claim>

The claims to add.

Returns

The Task that represents the asynchronous operation, containing the IdentityResult of the operation.

Applies to