You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
org.keycloak.admin.client.resource.ClientsResource.findByClientId(String) should return single item #155
Currently org.keycloak.admin.client.resource.ClientsResource.findByClientId(String) returns a List but client id is unique so it should return a single ClientRepresentation (nullable or Optional).
Now clients of the method are forced to get the first element of the collection.
Thanks for the report. I agree that this is valid use-case. It has low priority for now, but contribution is welcome to eventually improve this.
Just a note that it will need to probably deprecated existing method on ClientsResource and introduce new method (maybe something like findClientByClientId) and deprecate existing method. This is needed for the backwards compatibility.
Also this will need to be fixed first in the keycloak/keycloak repository. Anyone is welcome to create dedicated issue in the keycloak/keycloak and send the PR there with the fix. If this is done, fix would then be added to keycloak-client automatically upon next sync (see the README and contribution guides for more details).
I created an issue in keycloak/keycloak repo, It would be nice if someone could take a look at it whenever they have time, obviously, and I will open a pull request for it after we agree on the structure.
Activity
mposolda commentedon Apr 15, 2025
Thanks for the report. I agree that this is valid use-case. It has low priority for now, but contribution is welcome to eventually improve this.
Just a note that it will need to probably deprecated existing method on
ClientsResourceand introduce new method (maybe something likefindClientByClientId) and deprecate existing method. This is needed for the backwards compatibility.Also this will need to be fixed first in the keycloak/keycloak repository. Anyone is welcome to create dedicated issue in the keycloak/keycloak and send the PR there with the fix. If this is done, fix would then be added to keycloak-client automatically upon next sync (see the README and contribution guides for more details).
Lunatix01 commentedon May 27, 2025
I created an issue in
keycloak/keycloakrepo, It would be nice if someone could take a look at it whenever they have time, obviously, and I will open a pull request for it after we agree on the structure.shawkins commentedon Mar 13, 2026
@mposolda this can be closed as the issue / pr have been closed in the other repo.