@@ -3993,6 +3993,25 @@ def get_group_client_roles(self, group_id: str, client_id: str) -> list:
39933993 )
39943994 return raise_error_from_response (data_raw , KeycloakGetError )
39953995
3996+ def get_all_roles_of_group (self , group_id : str , brief_representation : bool = True ) -> dict :
3997+ """
3998+ Get all roles of a group.
3999+
4000+ :param group_id: id of the group
4001+ :type group_id: str
4002+ :param brief_representation: whether to omit role attributes in the response
4003+ :type brief_representation: bool
4004+ :return: Keycloak server response
4005+ :rtype: list
4006+ """
4007+ params_path = {"realm-name" : self .connection .realm_name , "id" : group_id }
4008+ params = {"briefRepresentation" : brief_representation }
4009+ data_raw = self .connection .raw_get (
4010+ urls_patterns .URL_ADMIN_GROUP_ALL_ROLES .format (** params_path ),
4011+ ** params
4012+ )
4013+ return raise_error_from_response (data_raw , KeycloakGetError )
4014+
39964015 def delete_group_client_roles (self , group_id : str , client_id : str , roles : str | list ) -> bytes :
39974016 """
39984017 Delete client roles of a group.
@@ -9278,6 +9297,25 @@ async def a_get_group_client_roles(self, group_id: str, client_id: str) -> list:
92789297 )
92799298 return raise_error_from_response (data_raw , KeycloakGetError )
92809299
9300+ async def a_get_all_roles_of_group (self , group_id : str , brief_representation : bool = True ) -> dict :
9301+ """
9302+ Get all roles of a group asynchronously.
9303+
9304+ :param group_id: id of the group
9305+ :type group_id: str
9306+ :param brief_representation: whether to omit role attributes in the response
9307+ :type brief_representation: bool
9308+ :return: Keycloak server response
9309+ :rtype: list
9310+ """
9311+ params_path = {"realm-name" : self .connection .realm_name , "id" : group_id }
9312+ params = {"briefRepresentation" : brief_representation }
9313+ data_raw = await self .connection .a_raw_get (
9314+ urls_patterns .URL_ADMIN_GROUP_ALL_ROLES .format (** params_path ),
9315+ ** params
9316+ )
9317+ return raise_error_from_response (data_raw , KeycloakGetError )
9318+
92819319 async def a_delete_group_client_roles (
92829320 self ,
92839321 group_id : str ,
0 commit comments