Share via


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

Definition

Retrieves all users in the specified role.

public override System.Threading.Tasks.Task<System.Collections.Generic.IList<TUser>> GetUsersInRoleAsync(string normalizedRoleName, System.Threading.CancellationToken cancellationToken = default);
override this.GetUsersInRoleAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<'User>>
Public Overrides 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.

Applies to