From 4a4320c5c3c35827813e7ee00aefdfde6c73f1c3 Mon Sep 17 00:00:00 2001 From: Khaled <45347802+JavaDeveloper456788@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:35:24 -0800 Subject: [PATCH] Update update-kc.sh --- Keycloak/update-kc.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Keycloak/update-kc.sh b/Keycloak/update-kc.sh index 28bd13b..c018e0c 100644 --- a/Keycloak/update-kc.sh +++ b/Keycloak/update-kc.sh @@ -63,10 +63,11 @@ do --data-raw "$line") echo -e " Response : $result\n" default_scopes=$(echo "$line" | jq -r '.defaultClientScopes[]') + clientId=$(echo "$line" | jq -r '.clientId') CLIENT_UUID=$(curl -s -X GET "$KC_BASE_URL/$KC_REALM_ID/clients" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $TKN" \ - | jq '.[] | select(.clientId=="'"$CLIENT_ID"'")' | jq -r '.id') + | jq '.[] | select(.clientId=="'"$clientId"'")' | jq -r '.id') echo "$default_scopes" | while read -r scope; do echo "$CLIENT_UUID"