[keycloak-user] Create scopes from the REST API

Stefan Hesse lists at stefan-hesse.net
Thu May 24 06:25:28 EDT 2018


Thanks for the input, for those interested in how to actually do this
from the CLI:

./kcadm.sh create clients/[client_id]/authz/resource-server/scope -r
[realm_name] -s name=[scope_name] -s displayName=[displayName]

The URL can be deduced using the documentation:
https://www.keycloak.org/docs/3.0/server_admin/topics/admin-cli.html#_basic_operations_and_resource_uris

In order to use it with any REST-Client.


On 05/22/2018 03:20 PM, Pedro Igor Silva wrote:
> You can use Keycloak Admin Java Client to manage scopes. Here is an
> example [1].
>
> But yeah, we are missing docs for authz services related resources in
> rest-api docs.
>
> [1] org.keycloak.testsuite.admin.client.authorization.AbstractAuthorizationTest#createScope 
>
> On Tue, May 22, 2018 at 9:43 AM, Stefan Hesse <lists at stefan-hesse.net
> <mailto:lists at stefan-hesse.net>> wrote:
>
>     Hello,
>
>     I am looking for a way to create a scope from the REST-API:
>     https://www.keycloak.org/docs-api/4.0/rest-api/index.html#_scoperepresentation
>     <https://www.keycloak.org/docs-api/4.0/rest-api/index.html#_scoperepresentation>
>
>     But I simply can't find the appropriate resource in the doc.
>
>     We need this, because we use Keycloak to mange permissions for "apps",
>     which are supposed to "register" them-self in keycloak, in order
>     to link
>     them to users.
>
>     Best Regards
>
>     Stefan
>
>     _______________________________________________
>     keycloak-user mailing list
>     keycloak-user at lists.jboss.org <mailto:keycloak-user at lists.jboss.org>
>     https://lists.jboss.org/mailman/listinfo/keycloak-user
>     <https://lists.jboss.org/mailman/listinfo/keycloak-user>
>
>



More information about the keycloak-user mailing list