This curl works. We should give clientId ("a48108f0-8465-4f91-8a90-39c72f1a05b8"
) as containerId
and roleId ("36c11a6e-a43a-427c-9c28-90352b369d79"
) as Id
.
curl -X POST \
http://localhost:7600/auth/admin/realms/adanic/users/4cf43901-663a-4796-bca7-fdfb8642476d/role-mappings/clients/a48108f0-8465-4f91-8a90-39c72f1a05b8 \
-H 'Accept: */*' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJtNnlDZ1ZsbVZRbW5QSmo2UC14Vm1rdG84dnVKNVdhSnlqNTR6d1llSHk0In0.eyJqdGkiOiJjY2U3YTVjNy03YTRmLTQ2ODktYTM2Zi03YjkyOTJhNjlkY2EiLCJleHAiOjE1Nzc1OTg4NDgsIm5iZiI6MCwiaWF0IjoxNTc3NTEyNDQ4LCJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojc2MDAvYXV0aC9yZWFsbXMvbWFzdGVyIiwic3ViIjoiYzJmOGQwYTctZDYyOC00OWEwLWFhZTUtNzdiMDBkMzRkNjQ4IiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiYWRtaW4tY2xpIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiN2Q4OThhZjAtN2FkMS00YzVkLTgwNmQtOWQwMTNlNDEwMjY0IiwiYWNyIjoiMSIsInNjb3BlIjoicHJvZmlsZSBlbWFpbCBwaG9uZSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwicHJlZmVycmVkX3VzZXJuYW1lIjoiYWRtaW4ifQ.IZ9mx-05mNU2UOvKDXjLbiSbbpoVV7sTKeXAzY7bLbduYApDA9vRsOkUCLB_2Hhdj53Fjp_DxoMKkRsc-D4GIbTTBpKEmB65cH8xsKlt-Ne9vMLW5n_SZRaptTysUHPSfh-NxlUSFwAjXyYp2cH1TQBmUVW3czF1b_8i8b3KAIheq7VLyZcQ8mUTTli1egHlUNLOoqmQO3BEU-fcaI4SPfMHZ4pDWYfFHUJ3B1-be1MTCaVT3LVZKpi7spb-H_o3zmRJnLQdxDqG0-BAIBsytaq6vQ1gf4wzQAzbTvT5VB8FnyRkWID8vum4MW_3XfjABPS2_j1F2cs7Grh7xYd2ew' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Length: 285' \
-H 'Content-Type: application/json' \
-H 'Host: localhost:7600' \
-H 'User-Agent: PostmanRuntime/7.20.1' \
-H 'cache-control: no-cache' \
-d ' [
{
"id": "36c11a6e-a43a-427c-9c28-90352b369d79",
"name": "test",
"description": "${role_create-client}",
"composite": false,
"clientRole": true,
"containerId": "a48108f0-8465-4f91-8a90-39c72f1a05b8"
}
]