UserManager<TUser>.GetRolesAsync(TUser) UserManager<TUser>.GetRolesAsync(TUser) UserManager<TUser>.GetRolesAsync(TUser) Method

Definition

Gets a list of role names the specified user belongs to.

public virtual System.Threading.Tasks.Task<System.Collections.Generic.IList<string>> GetRolesAsync (TUser user);
abstract member GetRolesAsync : 'User -> System.Threading.Tasks.Task<System.Collections.Generic.IList<string>>
override this.GetRolesAsync : 'User -> System.Threading.Tasks.Task<System.Collections.Generic.IList<string>>
Public Overridable Function GetRolesAsync (user As TUser) As Task(Of IList(Of String))

Parameters

user
TUser TUser TUser

The user whose role names to retrieve.

Returns

The Task that represents the asynchronous operation, containing a list of role names.

Applies to