python-keycloak
python-keycloak copied to clipboard
Create admin user in new Realm programmatically
trafficstars
keycloak_admin.create_realm_role({'name': 'admin', 'clientRole': False, 'composite': True, 'description': 'admin user'})
I am trying to create an admin user for new Realms upon creation. I cannot set composite to True, after creation the value is always False no matter what value I set.
You are creating a new role with that, not a new user (with admin rights). Use create_user() and assign_realm_roles().
But a new realm does not have an admin user by default right? So a new admin role must be created first?