[keycloak-user] Keycloak Admin REST API not updating user.federatedIdentities attribute

Dmitry Telegin dt at acutus.pro
Tue Jul 31 16:38:44 EDT 2018


Hi Daniel,

That's what you can do with federated identities currently:

GET /auth/admin/realms/{realm}/users/{user}/federated-identity - list federated identities configured for the user
POST /auth/admin/realms/{realm}/users/{user}/federated-identity/{provider} - create a new federated identity
DELETE /auth/admin/realms/{realm}/users/{user}/federated-identity/{provider} - remove federated identity

https://github.com/keycloak/keycloak/blob/master/services/src/main/java/org/keycloak/services/resources/admin/UserResource.java#L363

Updating federated entities with PUT is not supported yet. Feel free to
file an RFE in JIRA for that.

Meanwhile, you can implement this missing piece as a custom REST
resource and deploy it to your Keycloak. If I remember correctly, you
should be already familiar with the process :)

Good luck!
Dmitry Telegin
CTO, Acutus s.r.o.
Keycloak Consulting and Training

Pod lipami street 339/52, 130 00 Prague 3, Czech Republic
+42 (022) 888-30-71
E-mail: info at acutus.pro

On Tue, 2018-07-31 at 17:41 +0200, Daniel Teixeira wrote:
> I would like to update (and ideally create) the federatedIdentities
> attribute of a user using the Admin Rest API, but it seems like this does
> not work / or it is not supported?
> 
> I am able to update normal user attributes but not the federatedIdentities.
> 
> Is this a bug or is it supposed to be like this?
> 
> Is there a different way to do this? (Of course I could do an insert into,
> in the database, but I would prefer to use the api...). I need to run this
> for more than 200 users...
> 
> My code:
> https://github.com/ddtxra/python-console-keycloak-example/blob/master/admin-rest-api-update-user.py
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user


More information about the keycloak-user mailing list