public function Roles::getUsers in Auth0 Single Sign On 8.2
Get users assigned to a specific role. Required scopes:
- "read:roles"
- "read:users"
@link https://auth0.com/docs/api/management/v2#!/Roles/get_role_user
Parameters
string $role_id Role ID assigned to users.:
array $params Additional parameters.:
Return value
mixed
Throws
EmptyOrInvalidParameterException Thrown if the id parameter is empty or is not a string.
\Exception Thrown by the HTTP client when there is a problem with the API call.
File
- vendor/
auth0/ auth0-php/ src/ API/ Management/ Roles.php, line 233
Class
- Roles
- Class Roles. Handles requests to the Roles endpoint of the v2 Management API.
Namespace
Auth0\SDK\API\ManagementCode
public function getUsers($role_id, array $params = []) {
$this
->checkEmptyOrInvalidString($role_id, 'role_id');
$params = $this
->normalizePagination($params);
$params = $this
->normalizeIncludeTotals($params);
return $this->apiClient
->method('get')
->addPath('roles', $role_id)
->addPath('users')
->withDictParams($params)
->call();
}