[keycloak-user] How can I import client with scope?

Axel axelmak at gmail.com
Thu Oct 3 07:38:39 EDT 2019


Hello.
I'm searching a way to import clients. But I need to limit their scope.
Nor partial import nor cli knows about scope...
In admin console this json will import only client without scope:
{
  "scopeMappings": [
    {
      "client": "testClient",
      "roles": [
        "testRole"
      ]
    }
  ],
  "clients": [
    {
      "clientId": "testClient"
    }
  ]
}
In cli:
kcadm get scopeMappings -r TestRPT
Resource not found

I can insert directly to DB
INSERT INTO SCOPE_MAPPING (......
but it make no sense, cause it needs then to reboot KC.

So, is it a way to import client with scope or to add roles to scope of
existing client on the fly?

And one more big question - why comboboxes in admin console are not
resizable? only 5 visible elements - it is very little.

Thanks in advance.
Alexey Makarevich.


More information about the keycloak-user mailing list