count_organizations
Count organizations in a Keycloak realm and filter by name/domain, exact match, custom attributes, or identity provider. Requires Keycloak 26.3+.
Instructions
Returns the organizations counts. Requires Keycloak 26.3+.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"realm": "<realm>"
},
"name": "count_organizations"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | A query to search for custom attributes, in the format 'key1:value2 key2:value2' | |
| exact | No | Boolean which defines whether the param 'search' must match exactly or not | |
| realm | Yes | Realm name | |
| search | No | A String representing either an organization name or domain | |
| identityProvider | No | The alias of an identity provider, to only count the organizations linked to it. Cannot be combined with 'q' |