I am having trouble adding a default client role when posting a new user to
the ADMIN REST interface.
According to one data migration code, it would work:
https://github.com/keycloak/keycloak/blob/1aeec2a83c6677cd7dcfccb6ba2c39
d10143b920/examples/authz/photoz/photoz-realm.json
curl -v -X POST \
-H "Content-Type:application/json" \
-H 'Authorization: bearer xxxx' \
-d '{
"username": "my_user",
"enabled": true,
"credentials": [
{
"value" : "my_password",
"temporary" : false
} ],
"realmRoles": [
"offline_access", "uma_authorization"
],
"clientRoles": {
"realm-management": [
"view-clients"
]
}
}' \
https://mydomain/auth/admin/realms/myrealm/users
The new user is created, but role mappings are not assigned. Is this
another case of Admin REST API and AuthZ not working together?