UserManager<TUser, TKey>.GetRolesAsync Method

Returns the roles for the user.

Namespace:  Microsoft.AspNet.Identity
Assembly:  Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)

public virtual Task<IList<string>> GetRolesAsync(
	TKey userId
)

Parameters

userId
Type: TKey
The user ID.

Return Value

Type: System.Threading.Tasks.Task<IList<String>>
The task representing the asynchronous operation.
Show: