Update Keycloak client default scope through commands

I am trying to update clients defaultscope through command and it’s not working.
I have tried using these options

Kcadm.sh update clients/client ID -r realmname -s 'defaultClientScopes=“offline-acces” ’
I tried putting even offline-acces inside square bracket as well but it’s not working.

I faced the same issue and following the API calls made from the UI the following kcadm.sh command worked with some luck: /kcadm.sh update clients/${CLIENT_ID}/default-client-scopes/${CLIENT_SCOPE_ID} -r {REALM}

*NOTE: Please update the documentation

What do you mean with that?
This is a community forum, Keycloak maintainers do not really read here, and if, they won’t react on feature request in posts.
If you feel that the official documentation should be improved, open an issue in the official Keycloak GitHub repository and/or provide a PR for updating the docs. Keycloak is an open source software, so everyone is invited to contribute!

Got it, thanks for the clarification.

1 Like