{"record":{"id":"9c05e4e4deede01d","repo":"microsoft/semantic-kernel","slug":"missing-required-configuration-app-id-app-passwo","errorCode":null,"errorMessage":"Missing required configuration. APP_ID, APP_PASSWORD, and APP_TENANT_ID must be set.","messagePattern":"Missing required configuration\\. APP_ID, APP_PASSWORD, and APP_TENANT_ID must be set\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"python/samples/demos/copilot_studio_skill/src/api/config.py","lineNumber":38,"sourceCode":"    APP_PASSWORD = os.getenv(\"BOT_PASSWORD\")\n    APP_TENANTID = os.getenv(\"BOT_TENANT_ID\")\n    APP_TYPE = os.getenv(\"APP_TYPE\", \"singletenant\")\n\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":20,"sourceCodeEnd":46,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/python/samples/demos/copilot_studio_skill/src/api/config.py#L20-L46","documentation":"A generic Exception raised by Config.validate() when any of APP_ID, APP_PASSWORD, or APP_TENANTID is missing. These come from env vars BOT_APP_ID, BOT_PASSWORD, BOT_TENANT_ID and identify the bot's Azure app registration, which is mandatory for Bot Framework skill authentication. Without all three the bot cannot authenticate.","triggerScenarios":"Running the skill API when one or more of BOT_APP_ID / BOT_PASSWORD / BOT_TENANT_ID are unset, during the module-level config.validate() call at import time.","commonSituations":"Fresh deploy without the Azure app registration env vars; .env not loaded (load_dotenv failed); wrong env var names; secret rotated but env not updated.","solutions":["Set BOT_APP_ID, BOT_PASSWORD, and BOT_TENANT_ID from your Azure app registration.","Confirm load_dotenv(override=True) actually loads your .env (file in cwd, correct names).","If using real Azure auth, also ensure APP_TYPE matches the registration (singletenant/multitenant)."],"exampleFix":"// before\nBOT_APP_ID=\nBOT_PASSWORD=\nBOT_TENANT_ID=\n\n// after\nBOT_APP_ID=11111111-2222-3333-4444-555555555555\nBOT_PASSWORD=<client secret>\nBOT_TENANT_ID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee","handlingStrategy":"validation","validationCode":"import os\n\nrequired = ['BOT_APP_ID', 'BOT_PASSWORD', 'BOT_TENANT_ID']\nmissing = [k for k in required if not os.getenv(k)]\nif missing:\n    raise SystemExit(f\"Missing required bot env vars: {missing}\")","typeGuard":"import os\n\ndef has_bot_credentials() -> bool:\n    return all(os.getenv(k) for k in ('BOT_APP_ID', 'BOT_PASSWORD', 'BOT_TENANT_ID'))","tryCatchPattern":null,"preventionTips":["Provide a .env.example listing BOT_APP_ID, BOT_PASSWORD, BOT_TENANT_ID for new contributors.","Run a startup env check before config.validate() to give clear messages."],"tags":["configuration","env-vars","authentication","azure","copilot-studio"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}