microsoft/semantic-kernel · error · Exception
Missing required configuration. APP_ID, APP_PASSWORD, and AP
Error message
Missing required configuration. APP_ID, APP_PASSWORD, and APP_TENANT_ID must be set.
What it means
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.
Source
Thrown at python/samples/demos/copilot_studio_skill/src/api/config.py:38
APP_PASSWORD = os.getenv("BOT_PASSWORD")
APP_TENANTID = os.getenv("BOT_TENANT_ID")
APP_TYPE = os.getenv("APP_TYPE", "singletenant")
# Required for Copilot Skill
# Can be a list of allowed agent Ids,
# or "*" to allow any agent
ALLOWED_CALLERS = os.getenv("ALLOWED_CALLERS", ["*"])
# Required for Azure OpenAI
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME = os.getenv("AZURE_OPENAI_CHAT_DEPLOYMENT_NAME")
AZURE_OPENAI_ENDPOINT = os.getenv("AZURE_OPENAI_ENDPOINT")
AZURE_OPENAI_API_VERSION = os.getenv("AZURE_OPENAI_API_VERSION")
def validate(self):
if not self.HOST or not self.PORT:
raise Exception("Missing required configuration. HOST and PORT must be set.")
if not self.APP_ID or not self.APP_PASSWORD or not self.APP_TENANTID:
raise Exception("Missing required configuration. APP_ID, APP_PASSWORD, and APP_TENANT_ID must be set.")
if not self.ALLOWED_CALLERS:
raise Exception("Missing required configuration. ALLOWED_CALLERS must be set.")
config = Config()
config.validate()
View on GitHub (pinned to c028a0c7dc)
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).
Example fix
// before BOT_APP_ID= BOT_PASSWORD= BOT_TENANT_ID= // after BOT_APP_ID=11111111-2222-3333-4444-555555555555 BOT_PASSWORD=<client secret> BOT_TENANT_ID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
Defensive patterns
Strategy: validation
Validate before calling
import os
required = ['BOT_APP_ID', 'BOT_PASSWORD', 'BOT_TENANT_ID']
missing = [k for k in required if not os.getenv(k)]
if missing:
raise SystemExit(f"Missing required bot env vars: {missing}") Type guard
import os
def has_bot_credentials() -> bool:
return all(os.getenv(k) for k in ('BOT_APP_ID', 'BOT_PASSWORD', 'BOT_TENANT_ID')) Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Failed to initialize the booking sample settings.
- AllowedCallersClaimsValidator: config object cannot be None.
- "{self.config_key}" not found in configuration.
- Missing required configuration. HOST and PORT must be set.
- Copilot Studio SERVICE authentication is not available yet.
AI-assisted analysis of microsoft/semantic-kernel@c028a0c7dc (2026-08-13).
Data as JSON: /api/errors/9c05e4e4deede01d.
Report an issue: GitHub.