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
Name | Value |
---|---|
Requires authentication? | Yes |
Rate limited? | No |
Request
Request headers
Key | Value |
---|---|
Authorization | Bearer token |
Content-Type | application/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 Name | Type | Description |
---|---|---|
limit | Integer | provide limit |
offset | Integer | provide offset |
isUserEnabled | Boolean | Enable user. Per Default false |
username | String | Unique username of the user |
firstName | String | First name of user |
lastName | String | Last name of user |
isEmailVerified | String | Unique email corresponding to the user |
String | Email corresponding to the user | |
genericSearchVal | String | It 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. |
orderBy | String | Provide "asc or desc" to order it. |
orderByKey | String | firstName or lastName or email or username. |
fromDate | long | To fetch the user data based on the date of createdTimestamp in milliseconds. |
toDate | long | To 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 Name | Type | Description |
---|---|---|
message | String | Message explains result of the API call. Refer Response status Information for details. |
status | String | The status of the API call. Refer Response status Information for details. |
subSystem | Integer | subSystem categorizes the type of API that has been called. Refer Subsystem details for details. |
data | Object | User 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 Code | Status | Message |
---|---|---|
200 | Success | Users fetched successfully |
400 | BAD_REQUEST | ROLE_NOT_FOUND |
401 | Unauthorized | HTTP 401 Unauthorized |