[keycloak-user] Admin rest api - PUT - client update 500 internal server error

Tungatkar, Niranjan Niranjan.Tungatkar at arris.com
Thu Feb 28 13:30:54 EST 2019


Hi,

I am trying to update my client through the following curl request. I am to enable implicit flow. I also tried updating webOrigins and redirectUris but everytime I get 500 Internal server error.

curl -ivk -X PUT -H "Authorization: bearer $access_token" -H "Content-Type: application/json" https://$KC_FQDN:$KC_PORT/auth/admin/realms/TEST/clients/$client_id -d '{ "implicitFlowEnabled": true }'

Error in keycloak logs –
00:41:53,557 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-7) Uncaught server error: java.lang.NullPointerException
     at org.keycloak.services.resources.admin.ClientResource.updateClientFromRep(ClientResource.java:584)
     at org.keycloak.services.resources.admin.ClientResource.update(ClientResource.java:152)

I checked the Admin rest api PUT request spec here - https://www.keycloak.org/docs-api/3.4/rest-api/index.html#_clients_resource
The client representation from here - https://www.keycloak.org/docs-api/3.4/rest-api/index.html#_clientrepresentation
The representation suggests all attributes are optional

Keycloak version: 3.4.3.Final
Keycloak image: docker.io/jboss/keycloak-openshift:3.4.3.Final

How can I update the client through admin rest api.

--
Niranjan


More information about the keycloak-user mailing list