0
votes

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

1

1 Answers

0
votes

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

See this issue.