REST API to create or delete Identity Provider Links for an User in RH-SSO
Issue
-
What are the REST API endpoints to call for creating and deleting Identity Provider Links for an User ?
-
I would like to delete the
federatedIdentities
attribute values from an User by passing{"federatedIdentities":[]}
in the body of the PUT request, for example:curl -X PUT --insecure -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d "{\"federatedIdentities\":[]}" "https://<rh-sso-server-hostname-fqdn:port>/auth/admin/realms/<REALM_NAME>/users/<USER_ID>"
But, at every time I got a
Could not update user!
error message returned, with the following exceptions traces recorded in the RH-SSO server logs:[0m[33m11:29:23,689 WARN [org.keycloak.services.resources.admin.UserResource] (default task-1) Could not update user!: java.lang.NullPointerException at org.keycloak.keycloak-services@9.0.11.redhat-00001//org.keycloak.services.resources.admin.UserResource.updateUser(UserResource.java:169) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.jboss.resteasy.resteasy-jaxrs@3.11.3.Final-redhat-00001//org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:138) at org.jboss.resteasy.resteasy-jaxrs@3.11.3.Final-redhat-00001//org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:535) at ...
Environment
- Red Hat Single Sign-On (RH-SSO)
- 7
- Identity Providers (RH-SSO Identity Brokering)
- Admin REST API
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.