I successfully deployed an app service plan, web application and application insights resources using an ARM Template. The APPINSIGHTS_INSTRUMENTATIONKEY and APPLICATIONINSIGHTS_CONNECTION_STRING app settings have been added to the configuration/app settings.

The issue im noticing is that when I select the 'application insights' option in the menu I'm presented with 'Turn on Application Insights'. I thought adding the app settings above would turn on app insights but apparently not. Is it possible to enable app insights in an ARM Template? I'd like app insights to be enabled by default once the arm template deploys.

enter image description here

2 Answers 2


I resolved this issue by adding the additional application settings to my ARM template:

ApplicationInsightsAgent_EXTENSION_VERSION: "~2" and XDT_MicrosoftApplicationInsights_Mode: "default"

Once added application insights was turned on.

  • I tried this and your suggestions above and they did not work for me. Jun 16, 2021 at 9:20

With these configuration settings in ARM Template, It can be done

APPINSIGHTS_INSTRUMENTATIONKEY= "yourappinsightinstrumentation_key" APPLICATIONINSIGHTS_CONNECTION_STRING="yourappinsights_connection_string" ApplicationInsightsAgent_EXTENSION_VERSION: "~2" XDT_MicrosoftApplicationInsights_Mode: "default"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .