{"record":{"id":"b94125bc4476137e","repo":"microsoft/semantic-kernel","slug":"missing-required-configuration-allowed-callers-mu","errorCode":null,"errorMessage":"Missing required configuration. ALLOWED_CALLERS must be set.","messagePattern":"Missing required configuration\\. ALLOWED_CALLERS must be set\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"critical","filePath":"python/samples/demos/copilot_studio_skill/src/api/config.py","lineNumber":41,"sourceCode":"\n    # Required for Copilot Skill\n    # Can be a list of allowed agent Ids,\n    # or \"*\" to allow any agent\n    ALLOWED_CALLERS = os.getenv(\"ALLOWED_CALLERS\", [\"*\"])\n\n    # Required for Azure OpenAI\n    AZURE_OPENAI_CHAT_DEPLOYMENT_NAME = os.getenv(\"AZURE_OPENAI_CHAT_DEPLOYMENT_NAME\")\n    AZURE_OPENAI_ENDPOINT = os.getenv(\"AZURE_OPENAI_ENDPOINT\")\n    AZURE_OPENAI_API_VERSION = os.getenv(\"AZURE_OPENAI_API_VERSION\")\n\n    def validate(self):\n        if not self.HOST or not self.PORT:\n            raise Exception(\"Missing required configuration. HOST and PORT must be set.\")\n        if not self.APP_ID or not self.APP_PASSWORD or not self.APP_TENANTID:\n            raise Exception(\"Missing required configuration. APP_ID, APP_PASSWORD, and APP_TENANT_ID must be set.\")\n\n        if not self.ALLOWED_CALLERS:\n            raise Exception(\"Missing required configuration. ALLOWED_CALLERS must be set.\")\n\n\nconfig = Config()\nconfig.validate()\n","sourceCodeStart":23,"sourceCodeEnd":46,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/python/samples/demos/copilot_studio_skill/src/api/config.py#L23-L46","documentation":"Raised by the copilot_studio_skill sample's Config.validate() at module import time (config = Config(); config.validate() runs unconditionally). ALLOWED_CALLERS is the Bot Framework / Copilot Studio setting that whitelists which parent bots/skills may invoke this bot for skill-to-skill calls. When it is unset, the skill refuses to start because it cannot enforce caller authorization.","triggerScenarios":"Running the copilot_studio_skill API (importing python/samples/demos/copilot_studio_skill/src/api/config.py or starting the app) without the ALLOWED_CALLERS environment variable defined. validate() is invoked at import, so any process that loads this module triggers it.","commonSituations":"Copying the sample without copying its .env template; deploying to a new environment and forgetting to set ALLOWED_CALLERS; using a unique caller app ID per deployment but never adding it to the allowlist; running tests that import config.py directly.","solutions":["Set ALLOWED_CALLERS in your environment / .env file (the value is typically the MicrosoftAppId of the parent bot or a comma-separated list of allowed caller App IDs, often '*' for the sample).","Copy the sample's .env.example / env template into a local .env and fill in HOST, PORT, APP_ID, APP_PASSWORD, APP_TENANTID, and ALLOWED_CALLERS together.","If running the sample locally for experimentation, set ALLOWED_CALLERS=* to permit any caller.","Verify the value is actually loaded by Config.__init__ (os.getenv) before validate() runs."],"exampleFix":"// before\n# .env\nHOST=localhost\nPORT=3978\nAPP_ID=...\nAPP_PASSWORD=...\nAPP_TENANTID=...\n\n// after\n# .env\nHOST=localhost\nPORT=3978\nAPP_ID=...\nAPP_PASSWORD=...\nAPP_TENANTID=...\nALLOWED_CALLERS=*","handlingStrategy":"validation","validationCode":"import os\nallowed = os.getenv('ALLOWED_CALLERS')\nrequired = {'HOST','PORT','APP_ID','APP_PASSWORD','APP_TENANTID','ALLOWED_CALLERS'}\nmissing = [k for k in required if not os.getenv(k)]\nif missing:\n    raise SystemExit(f'Set env vars before starting: {missing}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep a .env.example checked in and diff your .env against it before deploy.","Run config validation as a startup healthcheck in CI, not only at runtime.","Document ALLOWED_CALLERS semantics (caller App IDs vs '*') in the sample README."],"tags":["configuration","bot-framework","copilot-studio","environment-variables","authorization"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}