Keycloak User Roles missing in REST API

后端 未结 1 796
南笙
南笙 2021-02-14 01:12

I would like to ask, if somebody knows, why there are no roles within the user details in REST ADMIN API request. I saw some posts dealing with this topic, but

相关标签:
1条回答
  • 2021-02-14 02:11

    You are not getting roles in the user details because the REST API is strictly resource based and roles are separate objects that are just associated to a user. The following REST URLs can be used to get a user's roles
    Getting the associated realm roles:
    GET /auth/admin/realms/{realm}/users/{user-uuid}/role-mappings/realm
    Getting the associated role of a specific client:
    GET /auth/admin/realms/{realm}/users/{user-uuid}/role-mappings/clients/{client-uuid}

    0 讨论(0)
提交回复
热议问题