diff --git a/services/src/main/java/org/keycloak/services/resources/admin/UsersResource.java b/services/src/main/java/org/keycloak/services/resources/admin/UsersResource.java index 24aa35adaf..e33e50e939 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/UsersResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/UsersResource.java @@ -792,7 +792,7 @@ public class UsersResource { } ClientModel clientModel = realm.getClientById(client); - if (client == null) { + if (clientModel == null) { throw new NotFoundException("Client not found"); }