UserManager<TUser>.RemoveFromRoleAsync(TUser, String) Method

Definition

Removes the specified user from the named role.

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

Parameters

user
TUser

The user to remove from the named role.

role
String

The name of the role to remove the user from.

Returns

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

Applies to