get_client_service_account
Retrieve the service account user for a Keycloak client by specifying its database ID and optional realm to manage identity and access.
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:272-288 (handler)The main async handler function for the 'get_client_service_account' MCP tool. It is decorated with @mcp.tool() for registration and executes the tool logic by calling KeycloakClient._make_request to fetch the service account user for the given client ID.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 )