Share via


UserManager<TUser>.RemoveFromRolesAsync Method

Definition

Removes the specified user from the named roles.

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

Parameters

user
TUser

The user to remove from the named roles.

roles
IEnumerable<String>

The name of the roles to remove the user from.

Returns

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

Applies to