{"record":{"id":"4744479aaa441beb","repo":"crewAIInc/crewAI","slug":"audience-is-required-please-set-it-in-the-configu-474447","errorCode":null,"errorMessage":"Audience is required. Please set it in the configuration.","messagePattern":"Audience is required\\. Please set it in the configuration\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"lib/crewai-core/src/crewai_core/auth/providers/entra_id.py","lineNumber":27,"sourceCode":"\nclass EntraIdProvider(BaseProvider):\n    \"\"\"Entra ID (Azure AD) OAuth2 provider implementation.\"\"\"\n\n    def get_authorize_url(self) -> str:\n        return f\"{self._base_url()}/oauth2/v2.0/devicecode\"\n\n    def get_token_url(self) -> str:\n        return f\"{self._base_url()}/oauth2/v2.0/token\"\n\n    def get_jwks_url(self) -> str:\n        return f\"{self._base_url()}/discovery/v2.0/keys\"\n\n    def get_issuer(self) -> str:\n        return f\"{self._base_url()}/v2.0\"\n\n    def get_audience(self) -> str:\n        if self.settings.audience is None:\n            raise ValueError(\n                \"Audience is required. Please set it in the configuration.\"\n            )\n        return self.settings.audience\n\n    def get_client_id(self) -> str:\n        if self.settings.client_id is None:\n            raise ValueError(\n                \"Client ID is required. Please set it in the configuration.\"\n            )\n        return self.settings.client_id\n\n    def get_oauth_scopes(self) -> list[str]:\n        return [\n            *super().get_oauth_scopes(),\n            *cast(str, self.settings.extra.get(\"scope\", \"\")).split(),\n        ]\n\n    def get_required_fields(self) -> list[str]:","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/crewai-core/src/crewai_core/auth/providers/entra_id.py#L9-L45","documentation":"Error \"Audience is required. Please set it in the configuration.\" thrown in crewAIInc/crewAI.","triggerScenarios":"Thrown at lib/crewai-core/src/crewai_core/auth/providers/entra_id.py:27 when the library encounters an invalid state.","commonSituations":"Occurs when the Entra ID provider configuration is missing the audience value. Set the audience in the configuration before initializing the provider.","solutions":["Set the audience in your Entra ID provider configuration.","Use the Application ID URI of your registered Entra ID app as the audience."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}