Mohit Agrawal
Mohit Agrawal

Reputation: 323

Keycloak admin user creation

Can we create a admin user in keycloak using below rest-api ?

https://$HOSTNAME/auth/admin/realms/{REALM}/users

I am using the below payload , but it's now working.

{ "attributes" : {}, "emailVerified": "", "enabled": true, "username": "admin", "clientRoles": {"realm-management": [ "realm-admin" ] } }

Thanks in advance

Upvotes: 0

Views: 1141

Answers (1)

You have to call a separate REST API after you create the user to add roles/groups.

See this issue.

Upvotes: 0

Related Questions