title: How to Set Up Application Insights from an Release Pipeline/ARM Templates
body: <p>We have an Azure DevOps release pipeline, which sets up all of our Azure resources in a location. I can create everything successfully with ARM templates, but I'm struggling to link the App Service with the App Insights resource.</p>
  
  <p>If I were doing it manually, I'd click a "Turn on site extension" button in the AppInsights blade of the App Service (under the heading "Enable Application Insights through site extension without redeploying your code").</p>
  
  <p>I've tried adding an "Azure App Service Manage" step to my release pipeline, set to install the "Application Insights extension for Azure App Service" extension:</p>
  
  <p><a href="https://i.stack.imgur.com/TIkXR.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TIkXR.png" alt="Screenshot of Release Pipeline Step for Installing AppInsights"></a></p>
  
  <p>In addition, I've added an "Azure App Service Manage" step to my release pipeline, set to "Enable Continuous Monitoring":</p>
  
  <p><a href="https://i.stack.imgur.com/FlJUC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FlJUC.png" alt="Screenshot of Release Pipeline Step for Enabling Continuous Monitoring"></a></p>
  
  <p>But the result is still that AppInsights is connected, but the extension is not installed:</p>
  
  <p><a href="https://i.stack.imgur.com/E01UH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/E01UH.png" alt="Screenshot of Azure Portal showing extension is not turned on"></a></p>
  
  <p>Is there any way I can do this automatically? Either via an ARM template, a PowerShell script, or something else?</p>
  
  <p><strong>Edit:</strong> In the "Extensions" blade, I can see "Application Insights extension for Azure App Service" (v2.6.5) and "ASP.NET Core Logging Extensions" (v2.2.0), but I'm still asked to "Turn on site extension" in the "Aplication Insights" blade.</p>