LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

kcadm.sh

keycloak Admin CLI

TLDR

Login to Keycloak
$ kcadm.sh config credentials --server [url] --realm [master] --user [admin]
copy
Create realm
$ kcadm.sh create realms -s realm=[name] -s enabled=true
copy
Create user
$ kcadm.sh create users -r [realm] -s username=[user] -s enabled=true
copy
Get users
$ kcadm.sh get users -r [realm]
copy
Update user
$ kcadm.sh update users/[id] -r [realm] -s email=[email]
copy
Set password
$ kcadm.sh set-password -r [realm] --username [user] --new-password [pass]
copy

SYNOPSIS

kcadm.sh command [options]

DESCRIPTION

kcadm.sh is the Keycloak Admin CLI. It manages Keycloak identity and access management configurations.The tool provides full administrative access to Keycloak. It creates users, realms, clients, and roles.

PARAMETERS

config credentials

Configure authentication.
create RESOURCE
Create resource.
get RESOURCE
Get resource(s).
update RESOURCE
Update resource.
delete RESOURCE
Delete resource.
-r REALM
Target realm.
-s ATTR=VALUE
Set attribute.
--help
Display help information.

CAVEATS

Requires Java. Keycloak must be running. Admin credentials needed.

HISTORY

kcadm.sh is the official admin CLI for Keycloak, the open-source identity and access management solution.

SEE ALSO

keycloak(1), curl(1)

Copied to clipboard
Kai