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
2
votes
0 answers

unable to create a resource in keycloak server getting "error":"invalid_bearer_token"

I am trying to create a resource from keycloak from this link for that we need a PAT here here is how i am getting a pat curl -X POST \ -H "Content-Type: application/x-www-form-urlencoded" \ -d…
swaheed
  • 3,671
  • 10
  • 42
  • 103
2
votes
1 answer

How to do a full export (including users) with embedded keycloak

I have a Springboot application using embedded keycloak. What I am looking for is a way to load the keycloak server from it, make changes to the configuration, add users and to then export this new version of keycloak. This question got an answer…
2
votes
2 answers

Keycloak return service in user api

Hi I use Keycloak API to get users with status enabled GET /auth/admin/realms/Test/users?enabled=true Receives users that are not on the user card in Keycloak for example: [ {"username": "service-account-test" ...}, {"username":…
mati2762
  • 43
  • 4
2
votes
1 answer

Is it possible to configure user in realm with rights to read/modify roles and users

Is it possible to configure in keycloak realm (but not in a master realm) to give users access to admin api. I want to be able as a keycloak user to configure other user roles/scopes etc. It will be done from fronted service so it cannot be done…
Grzegorz
  • 93
  • 8
2
votes
1 answer

How to search users inside group in Keycloak?

Using Keycloak 11.0.3. I trying to search users inside group using Keycloak API: List users = realmResource.users().search(username, firstname, lastname, email, 0, 100); But when I try to get groups of found users I get…
kostepanych
  • 2,229
  • 9
  • 32
  • 47
2
votes
1 answer

Add user to client role using Keycloak Rest API

I am trying to add a client level role to a specific user using the Keycloak rest API. I am trying this in Postman but keep getting 404 not found. Here is the url- https://{keycloak…
Chris
  • 141
  • 3
  • 13
2
votes
2 answers

Keycloak: how to send email to admin upon user registration / how to create a custom execution for sending email

I want to alter the User Registration flow to allow for emailing someone when there is a user registration. For altering the flow, this question provides an example. However, in my case, there is no execution I could add out of the box to email…
ntg
  • 12,950
  • 7
  • 74
  • 95
2
votes
1 answer

Keycloak PUT-request returns 401 (unauthorized)

I am using postman and I've tried updating a user's profile via http://localhost:8180/auth/admin/realms/demo/users/{userID} but I received a 401 response. The procedure I used: Requested and received admin token via…
divad
  • 75
  • 1
  • 8
2
votes
1 answer

Delete specific user from keycloak

I am checking the Keycloak documentation. I am trying to figure out which endpoint should I use for deleting specific user from KeyCloak. I am using it within my Symfony project on REST Api.. Could someone clearfy that for me?
joopeerr
  • 183
  • 1
  • 1
  • 12
2
votes
1 answer

Keycloak Introspection Endpoint

I'm trying to access to introspect endpoint in my Keycloak server /openid-connect/token/introspect from my front app, but I get next error: Access to fetch at 'http://localhost:8180/auth/realms/backoffice/protocol/openid-connect/token/introspect'…
Hector
  • 691
  • 2
  • 14
  • 28
2
votes
2 answers

Keycloak ignores realmRoles when adding a user by rest api

When I am creating a new user by using Keycloak rest API, the application ignores the realmRoles property not assigning the role to the new user. Here is an exemple POST: https://localhost:8543/auth/admin/realms/quarkus/users Body: { …
2
votes
1 answer

How to search keycloak users by employeeNumber or by custom attributes?

I wanted to search keycloak user using employeeNumber. I tried checking keycloak documentation but didn't find any API which will search based on employeeNumber/custom attributes. I m using below API to search the users with admin…
Akshaykumar Maldhure
  • 1,239
  • 1
  • 18
  • 32
2
votes
1 answer

Keycloak password policy

So, I have integrated keycloak API endpoints in my Symfony project.. Regarding https://ultimatesecurity.pro/post/password-policy/ we have added 'not username' policy to test on creating new user within the app. Idea is to delcare specific method…
joopeerr
  • 183
  • 1
  • 1
  • 12
2
votes
1 answer

Why I can not reach this keycloak rest api end point?

I am trying to retrieve users list based on their roles. I have this role: ROLE_ADMIN. I would like to retrieve every user that have this role. I try it with this…
stackstack293
  • 341
  • 3
  • 12
2
votes
1 answer

How to store external data in keycloak user model after registration

I want to store information (like an external ID) in custom user attributes after registration. The end goal is to have this information in the JWT token. I'm having trouble finding the right way to do it. I think this may not be a good design. More…