UserManager<TUser>.GetRolesAsync Method

Returns the roles for the user

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

Syntax

'Declaration
Public Overridable Function GetRolesAsync ( _
    userId As String _
) As Task(Of IList(Of String))
'Usage
Dim instance As UserManager 
Dim userId As String 
Dim returnValue As Task(Of IList(Of String))

returnValue = instance.GetRolesAsync(userId)
public virtual Task<IList<string>> GetRolesAsync(
    string userId
)
public:
virtual Task<IList<String^>^>^ GetRolesAsync(
    String^ userId
)
abstract GetRolesAsync : 
        userId:string -> Task<IList<string>> 
override GetRolesAsync : 
        userId:string -> Task<IList<string>> 
public function GetRolesAsync(
    userId : String
) : Task<IList<String>>

Parameters

Return Value

Type: System.Threading.Tasks.Task<IList<String>>

See Also

Reference

UserManager<TUser> Class

Microsoft.AspNet.Identity Namespace