Questions tagged [keycloak-rest-api]

This tag should be used for questions related to the Keycloak Admin Rest API. For instance, "is there an endpoint where I can request X information about the users?"

The Keycloak features provided by the Admin Console can be triggered via the Keycloak's Admin Rest API.

472 questions
4
votes
1 answer

Keycloak cannot verify user information with a valid token

I'm setting up Keycloak as an authentication server https://github.com/keycloak/keycloak/releases/download/12.0.0/keycloak-12.0.0.zip Java 11 Documentation:…
Rony Nguyen
  • 1,067
  • 8
  • 18
4
votes
2 answers

Is there a way to retrieve the number of members in a group using the Keycloak API?

I am using Keycloak API and I have a use case where I need to get the number of members in a group, before fetching all users. Unfortunately, both endpoints GET /{realm}/groups/{id}/members and GET /{realm}/groups/{id} do not return such…
Badr
  • 121
  • 1
  • 7
4
votes
2 answers

How to get Requesting Party Token (RPT) by API in Keycloak?

I am to struggling to find it but I can't find a solution. Does anyone help me? Here is my try. #1 First find PAT (Protection API Token) #2 get the permission ticket list #3 try get RPT but got "Ticket verification failed" error. #4 This source…
Bench Vue
  • 5,257
  • 2
  • 10
  • 14
4
votes
2 answers

Why am I getting a http 409 when creating an keycloak user (spring boot)?

firstly i'd Like to apologise for typos, writing thing on a tablet pc on a plain. I'm building a springboot app secured by a Keycloak service. I need my end-user to be able to create an keycloak User via my Frontend so I've tried to build it via the…
R. Polito
  • 544
  • 6
  • 21
4
votes
0 answers

How to Setup Spring Cloud Gateway with Keycloak Adapter?

I have setup a spring Cloud Gateway with Auth by keycloak but wanted to add Policy Enforcer of Keycloak for Fine Grained Authorisation. So that Cloud gateway will do the authorisation, and policy enforcement. And each microservies can act as a…
4
votes
2 answers

How to add Keycloak realm role to group via REST API

I want to assign the realm role "TEST_ROLE_123" to a group, I am using PUT /admin/realms/ataccamaone/groups/{group-id} { "realmRoles":["TEST_ROLE_123"] } I got group-id from /admin/realms/ataccamaone/groups/ However I get the response 204 No…
user2981968
  • 51
  • 1
  • 2
  • 3
4
votes
2 answers

Keycloak login from rest api has been blocked by CORS

I'm trying to login using keycloak from existing login page in localhost (localhost:3000). Keycloak run on another host (http://kchost:38080). I know it's not the recommended way to login but I need to adapt an existing system in no time. Trying…
assistbss
  • 527
  • 7
  • 25
4
votes
0 answers

Users created from the admin console only store the username when using the Storage Provider SPI

I have created a MongoDbUserStorageProvider to delegate the user storage into MongoDB: public class MongoDbUserStorageProvider implements UserStorageProvider, UserLookupProvider, CredentialInputValidator, …
codependent
  • 23,193
  • 31
  • 166
  • 308
4
votes
2 answers

How to delete Keycloak realm via REST API

I'm not able to delete realm via REST API on Keycloak 8.0.2. My Keycloak runs on localhost:38080. I followed this documentation https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_realms_admin_resource, see "Delete the realm" paragraph.…
Michal Krasny
  • 5,434
  • 7
  • 36
  • 64
3
votes
1 answer

Allow client to retrieve users from keycloak

I want to let my client application access user information from keycloak. Therefore, I created another realm (myrealm1) in keycloak and within that realm I created a new client (myclient1). keycloak configuration: Client configuration Actually, I…
hyperion
  • 119
  • 5
3
votes
1 answer

Keycloak Identity provider rest endpoint to login with identity provider

I have created identity provider and from browser it's working fine. Reference : Keycloak Identity provider post-broker-login throwing error From browser I can do login with external IDP and if the external IDP user is not there in keycloak it gets…
Ritesh Khatri
  • 1,253
  • 13
  • 29
3
votes
0 answers

Does Keycloak support pagination and sorting of users list?

I'm working on a project using Angular - Spring boot - Keycloak 16.0 and one of the requirements is for the user to be able to fetch the user's list from Keycloak paginated, filtered and sorted by a user attribute (ex. email, username, etc.). Based…
3
votes
1 answer

Why i can't create a new client in KeyCloak with access token from Login() in gocloak?

I'm writing an API that creates a new client in a keycloak server. I use the gocloak package to interact with the keycloak server. At first i passed in the access token from the gocloak.Login() func to the gocloak.CreateClient() and got a 403 error…
3
votes
0 answers

Keycloak login with mobile number and otp Rest api (Direct Grant)

I am migrating from spring security oauth to keycloak. My current system supports login with username/password, mobile number/password and moobile number/otp. Keycloak allows me login and generate token using username/password and mobile…
3
votes
2 answers

Keycloak: All API response with 404

I followed this tutorial to setup Keycloak and create user but the response for the step of Generating Access Tokens With Keycloak's API 404. I'm using Keycloak version 18.0.0 In the logs of keycloak I found this error 2022-06-12 23:59:57,177 DEBUG…
Sara Selim
  • 409
  • 5
  • 21
1 2
3
31 32