Skip to content

Azure Bicep files configuration TL;DR

This guide provides a deep dive into the specific configuration options available for your Azure Bot infrastructure. The settings are categorized by resource type to help you understand the impact of modifying the azurebot.bicep or the azure.parameters.json file.


The App Service Plan defines the “hardware” and cost of your bot’s hosting. In your parameters, this is controlled by webAppSKU.

SKU TierPerformance LevelBest For…Key Features
B11 vCPU, 1.75GB RAMDevelopment / MVPCustom domains, SSL, basic scaling, allowing CMK.
S11 vCPU, 3.5GB RAMSmall ProductionAuto-scaling, 10 staging slots, daily backups.
P1v32 vCPUs, 8GB RAMHigh TrafficFaster processors (v3), higher memory, scale to 30 units.
F1Shared CPUSandboxFree tier. Strictly for learning; no custom domains or SSL.

The template enforces a strict “Service Tag” firewall. These settings ensure your bot is not accessible to the general public, only to the Azure Bot Service itself.

ConfigurationSetting in BicepEffect
HTTPS OnlyhttpsOnly: trueRedirects all unencrypted traffic to secure https.
TLS VersionminTlsVersion: '1.2'Enforces modern encryption (TLS 1.2+).
Firewall Rule 1AllowBotServiceAllows traffic from the AzureBotService service tag.
Firewall Rule 2Deny allBlocks any other request from the public internet.
Managed Identityidentity: 'SystemAssigned'Allows the app to talk to Key Vault without a hardcoded password.

The Key Vault stores the “brain” of your bot’s identity. These settings protect against accidental deletion and data breaches.

FeatureStatusUser Impact
Soft DeleteEnabledIf deleted, the vault can be recovered for up to 7 days.
Purge ProtectionEnabledPrevents the vault from being permanently deleted until the 7-day period expires.
EncryptionRSA 2048Creates a standard cryptographic key for the app to use for signing or encrypting data.
Access PolicykvAccessSpecifically grants your Bot’s Identity permission to Get secrets and Wrap keys.

Everything your bot does is tracked in Log Analytics. These settings determine how long logs stay and what is captured.

Log CategoryDescriptionWhy it matters
AppServiceHTTPLogsIncoming/Outgoing Web RequestsEssential for debugging connection issues (401/403 errors).
AppServiceAppLogsconsole.log / Application outputShows your actual bot logic errors and stack traces.
Retention30 DaysSets how long your data is stored before being deleted (lower = cheaper).
App InsightsApplication_Type: 'web'Provides a “Map” of your bot’s performance and dependencies.

The azurebot.bicep module handles the identity that users interact with on platforms like Teams or Slack.

ParameterSourceDescription
botDisplayNameazure.parameters.jsonThe public name users see (e.g., “HR Helper Bot”).
botAppDomainGenerated OutputAutomatically maps your bot’s identity to its web URL.
botAadAppClientId${{BOT_ID}}The unique ID that tells Microsoft which bot identity is yours.

When using your azure.parameters.json, ensure the following placeholders are handled by your deployment script:

  • ${{RESOURCE_SUFFIX}}: Used to ensure global uniqueness (e.g., prod01).
  • ${{BOT_ID}}: Your Microsoft App ID.
  • ${{SECRET_BOT_PASSWORD}}: Your Microsoft App Secret (Securely stored in Key Vault).

Would you like me to create an Azure CLI script that specifically validates your Key Vault permissions once the deployment is finished?