keycloak api unable to assign ream role
up vote
0
down vote
favorite
I make post request to
https://my.host.com/auth/admin/realms/myrealm/users/3057018c-264c-4eb3-9e73-64b9b6eaf391/role-mappings/realm
with payload
[{"name":"my_role"}]
And I get back 404 Not Found response. I think this is referring to the role being not found. But I cannot understand why. Role exists within the realm and is being used by the realm users. I can also assign it via the UI.
Same happens when I send
[{"name":"offline_access"}]
for example. Nothing in the keycloak logs. Making GET to same URL returns back list of active roles for that user.
Any help would be appreciated
api keycloak
add a comment |
up vote
0
down vote
favorite
I make post request to
https://my.host.com/auth/admin/realms/myrealm/users/3057018c-264c-4eb3-9e73-64b9b6eaf391/role-mappings/realm
with payload
[{"name":"my_role"}]
And I get back 404 Not Found response. I think this is referring to the role being not found. But I cannot understand why. Role exists within the realm and is being used by the realm users. I can also assign it via the UI.
Same happens when I send
[{"name":"offline_access"}]
for example. Nothing in the keycloak logs. Making GET to same URL returns back list of active roles for that user.
Any help would be appreciated
api keycloak
1
Checking this a bit further: supplying role id in the payload makes it to work. [{"id":"b74b3514-42d8-40dc-a976-6c85c3a71c91","name":"my_role"}]. So, I have a workaround. But is there a way to skip using role ids?
– user431529
Nov 11 at 17:06
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I make post request to
https://my.host.com/auth/admin/realms/myrealm/users/3057018c-264c-4eb3-9e73-64b9b6eaf391/role-mappings/realm
with payload
[{"name":"my_role"}]
And I get back 404 Not Found response. I think this is referring to the role being not found. But I cannot understand why. Role exists within the realm and is being used by the realm users. I can also assign it via the UI.
Same happens when I send
[{"name":"offline_access"}]
for example. Nothing in the keycloak logs. Making GET to same URL returns back list of active roles for that user.
Any help would be appreciated
api keycloak
I make post request to
https://my.host.com/auth/admin/realms/myrealm/users/3057018c-264c-4eb3-9e73-64b9b6eaf391/role-mappings/realm
with payload
[{"name":"my_role"}]
And I get back 404 Not Found response. I think this is referring to the role being not found. But I cannot understand why. Role exists within the realm and is being used by the realm users. I can also assign it via the UI.
Same happens when I send
[{"name":"offline_access"}]
for example. Nothing in the keycloak logs. Making GET to same URL returns back list of active roles for that user.
Any help would be appreciated
api keycloak
api keycloak
asked Nov 11 at 13:17
user431529
1,3581213
1,3581213
1
Checking this a bit further: supplying role id in the payload makes it to work. [{"id":"b74b3514-42d8-40dc-a976-6c85c3a71c91","name":"my_role"}]. So, I have a workaround. But is there a way to skip using role ids?
– user431529
Nov 11 at 17:06
add a comment |
1
Checking this a bit further: supplying role id in the payload makes it to work. [{"id":"b74b3514-42d8-40dc-a976-6c85c3a71c91","name":"my_role"}]. So, I have a workaround. But is there a way to skip using role ids?
– user431529
Nov 11 at 17:06
1
1
Checking this a bit further: supplying role id in the payload makes it to work. [{"id":"b74b3514-42d8-40dc-a976-6c85c3a71c91","name":"my_role"}]. So, I have a workaround. But is there a way to skip using role ids?
– user431529
Nov 11 at 17:06
Checking this a bit further: supplying role id in the payload makes it to work. [{"id":"b74b3514-42d8-40dc-a976-6c85c3a71c91","name":"my_role"}]. So, I have a workaround. But is there a way to skip using role ids?
– user431529
Nov 11 at 17:06
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53249125%2fkeycloak-api-unable-to-assign-ream-role%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Checking this a bit further: supplying role id in the payload makes it to work. [{"id":"b74b3514-42d8-40dc-a976-6c85c3a71c91","name":"my_role"}]. So, I have a workaround. But is there a way to skip using role ids?
– user431529
Nov 11 at 17:06