diff --git a/integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/commands/AbstractRequestCmd.java b/integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/commands/AbstractRequestCmd.java index 1fb4c792dd..f175f404b9 100644 --- a/integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/commands/AbstractRequestCmd.java +++ b/integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/commands/AbstractRequestCmd.java @@ -385,8 +385,7 @@ public abstract class AbstractRequestCmd extends AbstractAuthOptionsCmd { } if (outputResult) { - - if (isCreateOrUpdate() && (response.getStatusCode() == 204 || id != null)) { + if (isCreateOrUpdate() && (response.getStatusCode() == 204 || id != null) && isGetByID(url)) { // get object for id headers = new Headers(); if (auth != null) { @@ -447,4 +446,8 @@ public abstract class AbstractRequestCmd extends AbstractAuthOptionsCmd { private boolean isCreateOrUpdate() { return "post".equals(httpVerb) || "put".equals(httpVerb); } + + private boolean isGetByID(String url) { + return !"clients-initial-access".equals(url); + } }