Skip to main content

Get Users Based On Client Role

The Get Users Based On Client Role API returns a list of users who have the specified client role.

Resource Informations

NameValue
Requires authentication?Yes
Rate limited?No

Request

Request headers

KeyValue
AuthorizationBearer token
Content-Typeapplication/json

HTTP request URL for SSMS

GET https://{tenantId}.{hostname}/digitanium/v4/apps/{clientRole}/{assignedRoles}/users?limit=1&offset=1&isUserEnabled={Boolean}&isEmailVerified={Boolean}&firstName={string}&lastName={string}&email={string}&username={string}&orderBy=asc&orderByKey=username&genericSearchVal={string}&fromDate={timestampinmillisecond}&toDate={timestampinmillisecond}

HTTP request URL for SHIFT

GET https://{hostname}/auth/realms/{tenantId}/v3_client/{clientRole}/{assignedRoles}/users?limit=1&offset=1&isUserEnabled={Boolean}&isEmailVerified={Boolean}&firstName={string}&lastName={string}&email={string}&username={string}&orderBy=asc&orderByKey=username&genericSearchVal={string}&fromDate={timestampinmillisecond}&toDate={timestampinmillisecond}
note

API requests must be made over https. Calls made over plain http will fail.

info

clientId which is specified in the client, for example "realm-management".
roleName which is specified in the realm-management clientId, for example "realm-admin"

Parameters

Parameter NameTypeDescription
limitIntegerprovide limit
offsetIntegerprovide offset
isUserEnabledBooleanEnable user. Per Default false
usernameStringUnique username of the user
firstNameStringFirst name of user
lastNameStringLast name of user
isEmailVerifiedStringUnique email corresponding to the user
emailStringEmail corresponding to the user
genericSearchValStringIt is a customized search for first name, last name, email, or username, and if the search is empty, we will consider the firstname, lastname, email, and username parameters, else these four parameters will be ignored.
orderByStringProvide "asc or desc" to order it.
orderByKeyStringfirstName or lastName or email or username.
fromDatelongTo fetch the user data based on the date of createdTimestamp in milliseconds.
toDatelongTo fetch the user data based on the date until which users have been createdTimestamp in milliseconds.

Request body

No request body fields are required.

Response

Field NameTypeDescription
messageStringMessage explains result of the API call. Refer Response status Information for details.
statusStringThe status of the API call. Refer Response status Information for details.
subSystemIntegersubSystem categorizes the type of API that has been called. Refer Subsystem details for details.
dataObjectUser Profile Information.

Sample Response

{
"message": "Users fetched successfully",
"status": "Success",
"subSystem": 5,
"data": {
"userList": [
{
"username": "admin",
"id": "89776cc4-52e5-464b-8b67-30aaf116c87f",
"email": "email@test.com",
"createdTimestamp": 1684214923416,
"enabled": true,
"emailVerified": true,
"attributes": {
"firstName": [
null
],
"lastName": [
null
],
"email": [
"mail@test.com"
],
"username": [
"admin"
]
},
"requiredActions": [],
"admin": false
},
{
"username": "demo",
"id": "84202f75-b678-4555-9cbf-1cf187c8ebbf",
"firstName": "demo",
"lastName": "test",
"enabled": true,
"emailVerified": false,
"attributes": {
"firstName": [
"demo"
],
"lastName": [
"test"
],
"otp_expiry_timestamp": [
"1655997828"
],
"email": [
null
],
"otp_creation_timestamp": [
"1655994228"
],
"username": [
"demokc15"
]
},
"requiredActions": [],
"admin": false
}
],
"page": {
"pageSize": 20,
"totalRecords": 397,
"totalPages": 20,
"currentPage": 1
}
}
}

Response Status Information

Status CodeStatusMessage
200SuccessUsers fetched successfully
400BAD_REQUESTROLE_NOT_FOUND
401UnauthorizedHTTP 401 Unauthorized