You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How do i update permissions properly with keycloak-admin-server?
#20314
I'm trying to setup fine grain permissions on keycloak programatically with node and keycloak-admin-client. However any attempts to use the updatePermission() method gives me a 409 response with "unknown_error".
Here's how i'm approaching it:
// By this point i've enabled fine grain permissions on the clients, therefore the permissions exist on realm-managementconstrealmManagementPermissions=awaitkc.clients.findPermissions({id: realmManagementClient.id, realm })for(constpinrealmManagementPermissions){// I want map-roles for all clients, so i filter like this:if(realmManagementPermissions[p].name.startsWith("map-roles.permission")){// Now i just add the policy to the permissionsawaitkc.clients.updatePermission({id: realmManagementClient.id,permissionId: realmManagementPermissions[p].id,type: "scope", realm },{policies: [adminPolicy.id]})}}
Looking at the failed request and comparing to the one created by the equivalent in keycloak's front-end, i'm sure it has the correct route, and the correct ids for the client policy and permission. Yet i get 409 every time, and i'm really not sure why.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to setup fine grain permissions on keycloak programatically with node and keycloak-admin-client. However any attempts to use the updatePermission() method gives me a 409 response with "unknown_error".
Here's how i'm approaching it:
Looking at the failed request and comparing to the one created by the equivalent in keycloak's front-end, i'm sure it has the correct route, and the correct ids for the client policy and permission. Yet i get 409 every time, and i'm really not sure why.
All reactions