Hi all,
we are using the Admin Rest API to get a list of users for a realm.
for some reason when using a query parameter of “username” the result we are getting are incorrect
when accessing the admin console we get this user when pressing “view all users”
and when sending a “GetUsers” request with no query parameters we are getting the same results
(https://[KC_API_URL]/admin/realms/[realm_name]/users)
But, when adding a query parameter like this:
https://[KC_API_URL]/admin/realms/[realm_name]/users?username=ale
we get this result:
[
{
“id”: “296b6c46-1864-4284-860b-3521a7a8cc9d”,
“createdTimestamp”: 1604216553710,
“username”: “service-account-alertsservice”,
“enabled”: true,
“totp”: false,
“emailVerified”: false,
“disableableCredentialTypes”: ,
“requiredActions”: ,
“notBefore”: 0,
“access”: {
“manageGroupMembership”: true,
“view”: true,
“mapRoles”: true,
“impersonate”: true,
“manage”: true
}
}
]
we have a client named “AlertsService” and when inspecting the DB I do see that for every client that we are adding KC creates a user entity with a user name: service-account-[clientName] (in my case “service-account-alertsservice”)
- Is this a normal behavior?
- how can we filter results like this from “Users” GET results?
- Why when we send a GET request with no query parameters we don’t get that user? - seems like inconsistent behavior
thanks!