Questions tagged [keycloak-admin-cli]

Use this tag for issues related with Keycloak's Admin Command-line Interface (CLI). For instance, problems related with the use of the scripts kcadm.sh and kcadm.bat.

Some of the administrative tasks that can be performed using the Keycloak Admin Console, can also be performed using the Keycloak's admin command-line interface (CLI). For more details refer to the keycloak documentation about the The Admin CLI.

The Admin CLI is packaged inside Keycloak Server distribution. You can find execution scripts inside the bin directory.

The Linux script is called kcadm.sh, and the script for Windows is called kcadm.bat.

15 questions
4
votes
4 answers

How to terminate/stop quarkus keycloak server version 17.x.x?

Recently I downloaded the new version Keycloak 17.0.0 Quarkus distribution, unzipped and started the Keycloak server by running bin/kc.sh start-dev from my local $KEYCLOAK_HOME directory in a CygWin Bash window. The server is up and running and I…
3
votes
1 answer

Keycloak Admin CLI - Updating a realm with JSON file

Objective: Our objective is to update the entire realm provided a json file. Problem: The issue at hand is we cannot seem to update the realm entirely to include the client changes as well. Actions taken: Option 1: Based on the Keycloak Admin CLI…
tianqiwang
  • 91
  • 1
  • 5
2
votes
2 answers

Keycloak create identity provider mapper with admin cli

I'm trying to create a keycloak identity provider mapper with the admin client. It works with json file import, but for some scripting it would be better to have all in the options. When I run the statement I get a class cast exception: kcadm…
Jens Popp
  • 131
  • 1
  • 12
2
votes
1 answer

Not able to create composite role from json file

Here's the JSON with the role description: { "id": "", "name": "", "composite": true, "composites": { "client": { "realm-management": [ "realm-admin", …
being of habits
  • 317
  • 2
  • 11
2
votes
1 answer

How to verify a user's email when adding a new user with add-user-keycloak.sh?

We are currently adding default Keycloak users in the following way: /opt/jboss/keycloak/bin/add-user-keycloak.sh -r realm-name -u admin@test.com -p admin However, when I attempt to generate a bearer token like this: curl --location --request POST…
1
vote
1 answer

How to enable users to delete their own Keycloak account using API?

I have an Express.js CRUD application and I use Keycloak 18.0.2 for identity management. Keycloak handles Google and Facebook Single Sign-On (SSO) for my application, and all authentications are managed through Keycloak. Currently, users are…
1
vote
1 answer

what is the alternative for deprecated method org.keycloak.TokenVerifier.realmUrl()

I am trying to verify the AccessToken using below code - TokenVerifier verifier = TokenVerifier.create(StringAccessToken, AccessToken.class).withDefaultChecks(); PublicKey publicKey = getRealmPublicKey(verifier.getHeader()); return…
1
vote
0 answers

Managing multiple realms in a single keycloak admin client application

I have a keycloak server with multiple realms(tenants). I am creating a backend spring-boot application to manage the users and their roles (like adding/deleting/editing users,roles etc.) with keycloak-admin-client. Can someone advise me on how can…
1
vote
1 answer

java.lang.NoSuchMethodError: javax.ws.rs.core.UriBuilder.resolveTemplates(Ljava/util/Map;)Ljavax/ws/rs/core/UriBuilder

I'm trying to use spring boot keycloak client and admin into microservice contains spring cloud, I get this error when I want to create a user from keycloak admin api Thanks for you support error…
0
votes
1 answer

Keycloak Admin Client throws error in server logs

am using keycloak admin client with my custom SPI. I am getting this error when am trying to to create keycloak builder. previously i tried this solution also but this didnt worked for me. keycloak version 20.0.2 quarkus dist this is the code I am…
0
votes
1 answer

Keycloak API using admin user

I'm working with keycloak API to access offline user's sessions; I noticed a strange behavior and thus my question: a. When I use postman, I get the access token with this url: http://localhost:8080/realms/master/protocol/openid-connect/token b.…
0
votes
1 answer

Add role to user using Keycloak Admin Java API

The goal is to manager user's roles from my Angular front. The front will send me updated roles given for a user. Actually the user have ["ROLE_A"] The administrator updates user's role. Now the front sends me : ["ROLE_A","ROLE_B","ROLE_C"] for the…
0
votes
0 answers

Keycloak admin cli timeout

I am using the Keycloak-admin-client and want to get information from a user by searching him by id. @Service public class KeycloakService { Keycloak keycloak = KeycloakBuilder.builder() .serverUrl("/auth/") …
Marc B.
  • 94
  • 2
  • 9
0
votes
0 answers

how to add sub groups to an existing group in keyclaok :getting 404 not found

using keyclaok rest api i have easyliy created a group now i wanted to add a subGroup to it for that the documentation said the rest api lacks to add sub gropups to an exisitng group after some research i found this answer here is my code val…
swaheed
  • 3,671
  • 10
  • 42
  • 103
0
votes
1 answer

User creation with keycloak

I am trying to create user with keycloak's /users endpoint in a spring boot project . These are the steps I have followed First created an admin in master realm and admin-cli client. Used that to get instance of keycloak for further…