Skip to content

Instantly share code, notes, and snippets.

@akoserwal
Created August 23, 2024 20:18
Show Gist options
  • Save akoserwal/45ce71fcd3358c79894284dd081a20e1 to your computer and use it in GitHub Desktop.
Save akoserwal/45ce71fcd3358c79894284dd081a20e1 to your computer and use it in GitHub Desktop.
Create-Service-Account
CREATE=`curl -sk --data-raw '{
"authorizationServicesEnabled": false,
"clientId": "admin-sa",
"description": "admin-sa",
"name": "admin-sa",
"secret":"admin-sa",
"directAccessGrantsEnabled": false,
"serviceAccountsEnabled": true,
"publicClient": false,
"protocol": "openid-connect"
}' --header "Content-Type: application/json" --header "Authorization: Bearer $TOKEN" $KEYCLOAK_URL/admin/realms/$REALM/clients`
echo $CREATE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment