crewAIInc/crewAI · error · ValueError
Client ID is required. Please set it in the configuration.
Error message
Client ID is required. Please set it in the configuration.
What it means
Error "Client ID is required. Please set it in the configuration." thrown in crewAIInc/crewAI.
Source
Thrown at lib/crewai-core/src/crewai_core/auth/providers/keycloak.py:28
def get_authorize_url(self) -> str:
return f"{self._oauth2_base_url()}/realms/{self.settings.extra.get('realm')}/protocol/openid-connect/auth/device"
def get_token_url(self) -> str:
return f"{self._oauth2_base_url()}/realms/{self.settings.extra.get('realm')}/protocol/openid-connect/token"
def get_jwks_url(self) -> str:
return f"{self._oauth2_base_url()}/realms/{self.settings.extra.get('realm')}/protocol/openid-connect/certs"
def get_issuer(self) -> str:
return f"{self._oauth2_base_url()}/realms/{self.settings.extra.get('realm')}"
def get_audience(self) -> str:
return self.settings.audience or "no-audience-provided"
def get_client_id(self) -> str:
if self.settings.client_id is None:
raise ValueError(
"Client ID is required. Please set it in the configuration."
)
return self.settings.client_id
def get_required_fields(self) -> list[str]:
return ["realm"]
def _oauth2_base_url(self) -> str:
domain = self.settings.domain.removeprefix("https://").removeprefix("http://")
return f"https://{domain}"
View on GitHub (pinned to 754d7323be)
Solutions
- Set the client ID in your Keycloak provider configuration.
- Verify the client exists in your Keycloak realm and use its client ID.
When it happens
Trigger: Thrown at lib/crewai-core/src/crewai_core/auth/providers/keycloak.py:28 when the library encounters an invalid state.
Common situations: Occurs when the Keycloak provider configuration is missing the client ID. Set the client ID in the configuration before initializing the provider.
AI-assisted analysis of crewAIInc/crewAI@754d7323be (2026-08-15).
Data as JSON: /api/errors/f4820d70a3fb64da.
Report an issue: GitHub.