UserStore<TUser,TRole,TContext,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken>.GetUsersInRoleAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
The Task contains a list of users, if any, that are in the specified role.