get_client_service_account
Retrieve the service account user for a specified client in Keycloak by providing the client ID and optional realm. Simplifies access management for identity services.
Instructions
Get service account user for a client.
Args:
id: The client's database ID
realm: Target realm (uses default if not specified)
Returns:
Service account user object
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| realm | No |
Implementation Reference
- src/tools/client_tools.py:271-288 (handler)The main handler function for the 'get_client_service_account' tool. It is registered via the @mcp.tool() decorator and implements the logic to fetch the service account user for a given client ID using the KeycloakClient instance.@mcp.tool() async def get_client_service_account( id: str, realm: Optional[str] = None ) -> Dict[str, Any]: """ Get service account user for a client. Args: id: The client's database ID realm: Target realm (uses default if not specified) Returns: Service account user object """ return await client._make_request( "GET", f"/clients/{id}/service-account-user", realm=realm )