Share via


UserStore<TUser,TRole,TContext,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken>.GetUsersInRoleAsync Method

Definition

Retrieves all users in the specified role.

public virtual System.Threading.Tasks.Task<System.Collections.Generic.IList<TUser>> GetUsersInRoleAsync (string normalizedRoleName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetUsersInRoleAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<'User>>
override this.GetUsersInRoleAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<'User>>
Public Overridable Function GetUsersInRoleAsync (normalizedRoleName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IList(Of TUser))

Parameters

normalizedRoleName
String

The role whose users should be retrieved.

cancellationToken
CancellationToken

The CancellationToken used to propagate notifications that the operation should be canceled.

Returns

Task<IList<TUser>>

The Task contains a list of users, if any, that are in the specified role.

Implements

Applies to