Share via

How to turn off daily cap in Application Insights using Bicep templates?

Mahesh W 15 Reputation points Microsoft Employee
2026-04-14T20:53:27.2933333+00:00

There is no documentation about how to turn off daily cap on Application Insights resource even when it is backed by Log Analytics workspace.

Azure DevOps

2 answers

Sort by: Most helpful
  1. Mahesh W 15 Reputation points Microsoft Employee
    2026-05-06T06:25:35.23+00:00

    Set the cap to 99999 to make it appear "Off" in Azure portal. But the value is not effective. Effective value is still 1,000 GB. Practically, setting value upto 3000 in ARM/Bicep template takes effect.

    
    resource appInsights 'Microsoft.Insights/components@2020-02-02' = {
      name: name
      location: resourceGroup().location
      tags: enrichedTags
      kind: 'web'
      properties: {
        Application_Type: 'web'
        IngestionMode: 'LogAnalytics'
        WorkspaceResourceId: '<log analytics workspace resource id>'
      }
    }
    
    resource appInsightsPricingPlan 'microsoft.insights/components/pricingPlans@2017-10-01' = {
      parent: appInsights
      name: 'current'
      properties: {
        // Set a very high cap to avoid hitting it during normal operation. This is closest way to achieve equivalent of no daily cap.
        cap: 99999
        planType: 'Basic'
        stopSendNotificationWhenHitCap: false
      }
    }
    
    
    0 comments No comments

  2. Marcin Policht 88,075 Reputation points MVP Volunteer Moderator
    2026-04-14T21:50:06.4233333+00:00

    I'm not aware of the way of turning off or configuring the daily cap for an Application Insights resource natively through a Bicep template property. While the Microsoft.Insights/components resource exists, it does not offer a direct property for managing the daily volume cap.

    For modern workspace-based Application Insights, you can manage the ingestion limit at the linked Log Analytics Workspace level. To ensure there is no active cap on the workspace, set the dailyQuotaGb property to -1 within the workspaceCapping block of the Microsoft.OperationalInsights/workspaces resource. By default, Log Analytics does not enable a daily cap unless explicitly configured.

    resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' = {
      name: 'my-workspace'
      location: resourceGroup().location
      properties: {
        workspaceCapping: {
          dailyQuotaGb: -1
        }
      }
    }
    

    If you need to manage the cap for a specific Application Insights component or want to ensure the component-level cap is disabled, use a PowerShell script. The Set-AzApplicationInsightsDailyCap command can be used in a deployment script or CI/CD pipeline to automate this.

    Set-AzApplicationInsightsDailyCap -ResourceGroupName "my-rg" -Name "my-app-insights" -DailyCapGB 1000 -DisableNotificationWhenHitCap
    

    For workspace-based resources, be aware that the effective limit is the lower of the two caps if both are set on the Application Insights resource and the Log Analytics Workspace. If the cap is reached at either level, data ingestion will stop until the next reset period. '


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.