This document provides a complete reference for all configuration settings in the Copilot Adoption Bot.
Quick reference of every supported setting. Required = needed for the app to start; "if X" = conditionally required when a feature is enabled. See the detailed sections below for descriptions and examples.
| JSON Path | Env Var | Required |
|---|---|---|
MicrosoftAppId |
MicrosoftAppId |
Yes |
MicrosoftAppPassword |
MicrosoftAppPassword |
Yes |
MicrosoftAppType |
MicrosoftAppType |
No (default SingleTenant) |
GraphConfig:ClientId |
GraphConfig__ClientId |
Yes |
GraphConfig:ClientSecret |
GraphConfig__ClientSecret |
Yes |
GraphConfig:TenantId |
GraphConfig__TenantId |
Yes |
GraphConfig:Authority |
GraphConfig__Authority |
No |
GraphConfig:ApiAudience |
GraphConfig__ApiAudience |
No |
ConnectionStrings:Storage |
ConnectionStrings__Storage |
If not using RBAC |
StorageAuthConfig:UseRBAC |
StorageAuthConfig__UseRBAC |
If using RBAC |
StorageAuthConfig:StorageAccountName |
StorageAuthConfig__StorageAccountName |
If using RBAC |
StorageAuthConfig:RBACOverrideCredentials:ClientId |
StorageAuthConfig__RBACOverrideCredentials__ClientId |
No |
StorageAuthConfig:RBACOverrideCredentials:ClientSecret |
StorageAuthConfig__RBACOverrideCredentials__ClientSecret |
No |
StorageAuthConfig:RBACOverrideCredentials:TenantId |
StorageAuthConfig__RBACOverrideCredentials__TenantId |
No |
WebAuthConfig:ClientId |
WebAuthConfig__ClientId |
If using web admin panel |
WebAuthConfig:ClientSecret |
WebAuthConfig__ClientSecret |
If using web admin panel |
WebAuthConfig:TenantId |
WebAuthConfig__TenantId |
If using web admin panel |
WebAuthConfig:ApiAudience |
WebAuthConfig__ApiAudience |
If using web admin panel |
AppCatalogTeamAppId |
AppCatalogTeamAppId |
No |
AIFoundryConfig:Endpoint |
AIFoundryConfig__Endpoint |
If using AI features |
AIFoundryConfig:DeploymentName |
AIFoundryConfig__DeploymentName |
If using AI features |
AIFoundryConfig:RBACOverrideCredentials:ClientId |
AIFoundryConfig__RBACOverrideCredentials__ClientId |
No |
AIFoundryConfig:RBACOverrideCredentials:ClientSecret |
AIFoundryConfig__RBACOverrideCredentials__ClientSecret |
No |
AIFoundryConfig:RBACOverrideCredentials:TenantId |
AIFoundryConfig__RBACOverrideCredentials__TenantId |
No |
AIFoundryConfig:MaxTokens |
AIFoundryConfig__MaxTokens |
No (default 2000) |
AIFoundryConfig:Temperature |
AIFoundryConfig__Temperature |
No (default 0.7) |
APPLICATIONINSIGHTS_CONNECTION_STRING |
APPLICATIONINSIGHTS_CONNECTION_STRING |
No |
The application supports multiple configuration methods, applied in this order of precedence (highest to lowest):
- Environment Variables - Highest priority, used in production
- User Secrets - For local development (secrets stored outside project)
- appsettings.json - Base configuration file
- appsettings.{Environment}.json - Environment-specific overrides
For nested settings, use double underscores (__) in environment variables or colons (:) in JSON:
| JSON Path | Environment Variable | User Secret Command |
|---|---|---|
GraphConfig.ClientId |
GraphConfig__ClientId |
dotnet user-secrets set "GraphConfig:ClientId" "value" |
These settings are required for the application to function.
| Setting | Description | Example |
|---|---|---|
MicrosoftAppId |
Bot's application (client) ID from Teams Developer Portal | 12345678-1234-1234-1234-123456789abc |
MicrosoftAppPassword |
Bot's client secret from Teams Developer Portal | your-secret-value |
MicrosoftAppType |
Bot authentication type | SingleTenant (default) or MultiTenant |
JSON Example:
{
"MicrosoftAppId": "12345678-1234-1234-1234-123456789abc",
"MicrosoftAppPassword": "your-secret-value",
"MicrosoftAppType": "SingleTenant"
}| Setting | Description | Required | Example |
|---|---|---|---|
GraphConfig:ClientId |
Application (client) ID for Graph API access | Yes | 12345678-1234-1234-1234-123456789abc |
GraphConfig:ClientSecret |
Client secret for Graph API access | Yes | your-client-secret |
GraphConfig:TenantId |
Azure AD tenant ID | Yes | your-tenant-id |
GraphConfig:Authority |
Azure AD authority URL | No | https://login.microsoftonline.com/organizations (default) |
GraphConfig:ApiAudience |
API audience for token validation | No | api://your-app-id |
Note: Typically
GraphConfig:ClientIdandMicrosoftAppIdare the same value (the bot's app registration).
JSON Example:
{
"GraphConfig": {
"ClientId": "12345678-1234-1234-1234-123456789abc",
"ClientSecret": "your-client-secret",
"TenantId": "your-tenant-id"
}
}The application requires Azure Storage (Table Storage + Blob Storage). Choose one authentication method:
| Setting | Description | Example |
|---|---|---|
ConnectionStrings:Storage |
Full storage connection string | DefaultEndpointsProtocol=https;AccountName=...;AccountKey=... |
JSON Example:
{
"ConnectionStrings": {
"Storage": "DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=abc123...;EndpointSuffix=core.windows.net"
}
}| Setting | Description | Required | Example |
|---|---|---|---|
StorageAuthConfig:UseRBAC |
Enable RBAC authentication | Yes | true |
StorageAuthConfig:StorageAccountName |
Storage account name | Yes | mystorageaccount |
JSON Example:
{
"StorageAuthConfig": {
"UseRBAC": true,
"StorageAccountName": "mystorageaccount"
}
}If you need to use specific credentials instead of Managed Identity:
| Setting | Description | Example |
|---|---|---|
StorageAuthConfig:UseRBAC |
Enable RBAC authentication | true |
StorageAuthConfig:StorageAccountName |
Storage account name | mystorageaccount |
StorageAuthConfig:RBACOverrideCredentials:ClientId |
Service principal client ID | sp-client-id |
StorageAuthConfig:RBACOverrideCredentials:ClientSecret |
Service principal secret | sp-secret |
StorageAuthConfig:RBACOverrideCredentials:TenantId |
Tenant ID | tenant-id |
JSON Example:
{
"StorageAuthConfig": {
"UseRBAC": true,
"StorageAccountName": "mystorageaccount",
"RBACOverrideCredentials": {
"ClientId": "sp-client-id",
"ClientSecret": "sp-secret",
"TenantId": "tenant-id"
}
}
}Configuration for the web interface authentication (Teams SSO).
| Setting | Description | Required | Example |
|---|---|---|---|
WebAuthConfig:ClientId |
Client ID for web auth | No | Same as MicrosoftAppId |
WebAuthConfig:ClientSecret |
Client secret for web auth | No | Same as MicrosoftAppPassword |
WebAuthConfig:TenantId |
Tenant ID | No | Your tenant ID |
WebAuthConfig:ApiAudience |
API audience | No | api://your-app-id |
JSON Example:
{
"WebAuthConfig": {
"ClientId": "12345678-1234-1234-1234-123456789abc",
"ClientSecret": "your-client-secret",
"TenantId": "your-tenant-id",
"ApiAudience": "api://12345678-1234-1234-1234-123456789abc"
}
}| Setting | Description | Required | Example |
|---|---|---|---|
AppCatalogTeamAppId |
Teams app ID from the app catalog | No | com.contoso.copilotbot |
This is used to install the bot app for users who haven't interacted with it yet.
Enables "Copilot Connected" mode with AI-powered features including smart groups and follow-up conversations.
Authentication to Azure AI Foundry always uses Azure RBAC. API key authentication is not supported. The application uses DefaultAzureCredential by default (Managed Identity in Azure, Azure CLI locally, etc.); you can optionally override this with a specific service principal via AIFoundryConfig:RBACOverrideCredentials.
The identity used must have a role that grants data-plane access to the AI Foundry / Azure OpenAI resource, for example:
Cognitive Services OpenAI UserAzure AI Developer
| Setting | Description | Required | Default | Example |
|---|---|---|---|---|
AIFoundryConfig:Endpoint |
Azure AI Foundry endpoint URL | Yes* | - | https://your-resource.openai.azure.com/ |
AIFoundryConfig:DeploymentName |
Model deployment name | Yes* | - | gpt-4o-mini |
AIFoundryConfig:RBACOverrideCredentials:ClientId |
Service principal client ID (optional override) | No | - | sp-client-id |
AIFoundryConfig:RBACOverrideCredentials:ClientSecret |
Service principal secret (optional override) | No | - | sp-secret |
AIFoundryConfig:RBACOverrideCredentials:TenantId |
Service principal tenant ID (optional override) | No | - | tenant-id |
AIFoundryConfig:MaxTokens |
Maximum tokens for responses | No | 2000 |
4000 |
AIFoundryConfig:Temperature |
Response creativity (0.0-1.0) | No | 0.7 |
0.5 |
* Required only if enabling AI features.
JSON Example (Managed Identity / Azure CLI - recommended):
{
"AIFoundryConfig": {
"Endpoint": "https://your-resource.openai.azure.com/",
"DeploymentName": "gpt-4o-mini",
"MaxTokens": 2000,
"Temperature": "0.7"
}
}JSON Example (with service principal override):
{
"AIFoundryConfig": {
"Endpoint": "https://your-resource.openai.azure.com/",
"DeploymentName": "gpt-4o-mini",
"RBACOverrideCredentials": {
"ClientId": "sp-client-id",
"ClientSecret": "sp-secret",
"TenantId": "tenant-id"
}
}
}| Setting | Description | Example |
|---|---|---|
APPLICATIONINSIGHTS_CONNECTION_STRING |
Connection string for telemetry | InstrumentationKey=...;IngestionEndpoint=... |
Controls user data synchronization and caching behavior.
| Setting | Description | Default | Example |
|---|---|---|---|
UserCacheConfig:CacheExpiration |
How long cached user data is valid | 01:00:00 (1 hour) |
02:00:00 |
UserCacheConfig:CopilotStatsRefreshInterval |
How often to refresh Copilot stats | 1.00:00:00 (24 hours) |
12:00:00 |
UserCacheConfig:FullSyncInterval |
How often to force full sync | 7.00:00:00 (7 days) |
3.00:00:00 |
UserCacheConfig:CopilotStatsPeriod |
Copilot stats period | D30 |
D7, D30, D90, D180 |
UserCacheConfig:UserCacheTableName |
Table name for user cache | usercache |
usercache |
UserCacheConfig:SyncMetadataTableName |
Table name for sync metadata | usersyncmetadata |
usersyncmetadata |
JSON Example:
{
"UserCacheConfig": {
"CacheExpiration": "01:00:00",
"CopilotStatsRefreshInterval": "1.00:00:00",
"CopilotStatsPeriod": "D30"
}
}| Setting | Description | Default | Example |
|---|---|---|---|
DevMode |
Enable development mode features | false |
true |
TestUPN |
Test user principal name for development | - | testuser@contoso.com |
Standard ASP.NET Core logging configuration.
JSON Example:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Microsoft.Bot": "Debug"
}
}
}| Log Level | Use Case |
|---|---|
Trace |
Most detailed logs |
Debug |
Development debugging |
Information |
General operational logs (default) |
Warning |
Unexpected but handled situations |
Error |
Errors and exceptions |
Critical |
System failures |
cd src/Full/Bot/Web/Web.Server
# Bot identity
dotnet user-secrets set "MicrosoftAppId" "your-bot-app-id"
dotnet user-secrets set "MicrosoftAppPassword" "your-bot-password"
# Graph API
dotnet user-secrets set "GraphConfig:ClientId" "your-bot-app-id"
dotnet user-secrets set "GraphConfig:ClientSecret" "your-bot-password"
dotnet user-secrets set "GraphConfig:TenantId" "your-tenant-id"
# Storage (connection string for simplicity)
dotnet user-secrets set "ConnectionStrings:Storage" "DefaultEndpointsProtocol=https;AccountName=...;AccountKey=..."
# Optional: Development mode
dotnet user-secrets set "DevMode" "true"
dotnet user-secrets set "TestUPN" "your-email@company.com"
# Optional: AI Foundry (RBAC only - uses Azure CLI / Managed Identity)
dotnet user-secrets set "AIFoundryConfig:Endpoint" "https://your-resource.openai.azure.com/"
dotnet user-secrets set "AIFoundryConfig:DeploymentName" "gpt-4o-mini"Configure these settings in the Azure Portal under Configuration → Application settings, or via Azure CLI.
Add these as Application settings (not Connection strings):
| Name | Value |
|---|---|
MicrosoftAppId |
your-bot-app-id |
MicrosoftAppPassword |
@Microsoft.KeyVault(SecretUri=https://your-kv.vault.azure.net/secrets/BotAppPassword/) |
MicrosoftAppType |
SingleTenant |
GraphConfig__ClientId |
your-bot-app-id |
GraphConfig__ClientSecret |
@Microsoft.KeyVault(SecretUri=https://your-kv.vault.azure.net/secrets/GraphClientSecret/) |
GraphConfig__TenantId |
your-tenant-id |
StorageAuthConfig__UseRBAC |
true |
StorageAuthConfig__StorageAccountName |
yourstorageaccount |
AppCatalogTeamAppId |
your-teams-app-id |
APPLICATIONINSIGHTS_CONNECTION_STRING |
@Microsoft.KeyVault(SecretUri=https://your-kv.vault.azure.net/secrets/AppInsightsConnectionString/) |
AIFoundryConfig__Endpoint |
https://your-resource.openai.azure.com/ |
AIFoundryConfig__DeploymentName |
gpt-4o-mini |
Note: Use double underscores (
__) for nested settings in App Service configuration. This works on both Windows and Linux App Services.
# PowerShell
az webapp config appsettings set `
--name your-app-name `
--resource-group your-resource-group `
--settings `
MicrosoftAppId="your-bot-app-id" `
MicrosoftAppType="SingleTenant" `
GraphConfig__ClientId="your-bot-app-id" `
GraphConfig__TenantId="your-tenant-id" `
StorageAuthConfig__UseRBAC="true" `
StorageAuthConfig__StorageAccountName="yourstorageaccount"
# Secrets (use Key Vault references)
az webapp config appsettings set `
--name your-app-name `
--resource-group your-resource-group `
--settings `
"MicrosoftAppPassword=@Microsoft.KeyVault(SecretUri=https://your-kv.vault.azure.net/secrets/BotAppPassword/)" `
"GraphConfig__ClientSecret=@Microsoft.KeyVault(SecretUri=https://your-kv.vault.azure.net/secrets/GraphClientSecret/)"# Bash
az webapp config appsettings set \
--name your-app-name \
--resource-group your-resource-group \
--settings \
MicrosoftAppId="your-bot-app-id" \
MicrosoftAppType="SingleTenant" \
GraphConfig__ClientId="your-bot-app-id" \
GraphConfig__TenantId="your-tenant-id" \
StorageAuthConfig__UseRBAC="true" \
StorageAuthConfig__StorageAccountName="yourstorageaccount"
# Secrets (use Key Vault references)
az webapp config appsettings set \
--name your-app-name \
--resource-group your-resource-group \
--settings \
'MicrosoftAppPassword=@Microsoft.KeyVault(SecretUri=https://your-kv.vault.azure.net/secrets/BotAppPassword/)' \
'GraphConfig__ClientSecret=@Microsoft.KeyVault(SecretUri=https://your-kv.vault.azure.net/secrets/GraphClientSecret/)'| Aspect | Windows App Service | Linux App Service |
|---|---|---|
| Runtime | .NET 10 (Windows) | .NET 10 (Linux) |
| Config syntax | __ for nested settings |
__ for nested settings |
| Case sensitivity | Case-insensitive | Case-sensitive |
| File paths | Backslashes \ |
Forward slashes / |
| Startup command | Automatic | May need dotnet Web.Server.dll |
Important for Linux: Environment variable names are case-sensitive. Ensure
GraphConfig__ClientIdmatches exactly (including capitalization).
{
"MicrosoftAppId": "your-bot-app-id",
"MicrosoftAppType": "SingleTenant",
"GraphConfig": {
"ClientId": "your-bot-app-id",
"TenantId": "your-tenant-id"
},
"StorageAuthConfig": {
"UseRBAC": true,
"StorageAccountName": "yourstorageaccount"
},
"UserCacheConfig": {
"CopilotStatsPeriod": "D30",
"CacheExpiration": "01:00:00"
},
"AIFoundryConfig": {
"Endpoint": "https://your-resource.openai.azure.com/",
"DeploymentName": "gpt-4o-mini",
"MaxTokens": 2000,
"Temperature": "0.7"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}Note: Secrets like
MicrosoftAppPasswordandGraphConfig:ClientSecretshould be stored in Azure Key Vault and referenced via App Service configuration.AIFoundryConfiguses Azure RBAC, so the App Service Managed Identity should be granted a role such asCognitive Services OpenAI Useron the AI Foundry resource - no AI Foundry secret is needed.
The React frontend uses environment variables defined in .env.local:
| Variable | Description | Example |
|---|---|---|
VITE_MSAL_CLIENT_ID |
Client ID for MSAL authentication | your-bot-app-id |
VITE_MSAL_AUTHORITY |
Azure AD authority | https://login.microsoftonline.com/your-tenant-id |
VITE_MSAL_SCOPES |
API scopes for access token | api://your-app-id/access_as_user |
VITE_TEAMSFX_START_LOGIN_PAGE_URL |
Login redirect URL | https://localhost:5173/auth-start.html |
Example .env.local:
VITE_MSAL_CLIENT_ID=12345678-1234-1234-1234-123456789abc
VITE_MSAL_AUTHORITY=https://login.microsoftonline.com/your-tenant-id
VITE_MSAL_SCOPES=api://12345678-1234-1234-1234-123456789abc/access_as_user
VITE_TEAMSFX_START_LOGIN_PAGE_URL=https://localhost:5173/auth-start.htmlThe application validates required configuration on startup. Missing required values will cause the application to fail with a ConfigurationMissingException.
To test your configuration:
- Check startup logs for configuration errors
- Use the diagnostics endpoint:
GET /api/Diagnostics/TestGraphConnection - Review Application Insights for configuration-related exceptions
- Development Guide - Local development setup with User Secrets
- Deployment Guide - Production deployment configuration
- Security Guide - Security best practices for secrets management
- Troubleshooting Guide - Common configuration issues