Azure PowerShell - Find Classic Application Insights

Use Azure PowerShell to discover Classic Application Insights resources in your subscription.

If you use Azure Application Insights, you might have received an email like this from Microsoft:

Classic application insights will be retired on 29 February 2024—migrate to workspace-based application insights

You’re receiving this email because you use classic application insights in Azure Monitor.

On 29 February 2024, classic application insights in Azure Monitor will be retired and you’ll need to migrate your resources to workspace-based application insights by that date. As part of this change, beginning 1 September 2023, any new application insights resources you create will be workspace-based. Workspace-based application insights offers improved functionality such as:

  • Continuous export of app logs via diagnostic settings.
  • The ability to collect data from multiple resources in a single Azure Monitor log analytics workspace.
  • Enhanced encryption and optimization with a dedicated cluster.
  • New options to reduce costs.

Although most customers’ pricing will remain the same, some may experience a change associated with this migration. Use the Azure pricing calculator to confirm your pricing.

Required action

To avoid any disruptions in service, migrate your resources to workspace-based application insights by 29 February 2024.

If so, you’ll need to take action, but how do you find all the Application Insights resources that need updating?

In the Portal, the affected resources show an alert on the Overview blade that reads as follows:

Classic Application Insights is deprecated and will be retired in February 2024.

Migrate this resource to Workspace-based Application Insights to gain support for all of the capabilities of Log Analytics, including Customer-Managed Keys and Commitment Tiers. Click here to learn more and migrate in a few clicks."

Application Insights Warning

If you have a lot of Application Insights this could take you a while to find them all by paging through the web-based Azure Portal so here’s PowerShell to the rescue! The following snippet will list all the Application Insight resources that need attention:

1(Get-AzApplicationInsights).SyncRoot | `
2 Select-Object Name, ResourceGroupName, @{N="IngestionMode";E={[string]$_.IngestionMode}} | `
3 Where-Object {$_.IngestionMode -ne "LogAnalytics"} 

You’ll notice there’s an odd translation of the IngestionMode property to a string value in the Select-Object cmdlet. This is to catch resources that do not return this property and stop them breaking the Where-Object filter in the next line.

The PowerShell will produce a list of Application Insights resources not using the newer Log Analytics Workspace-based model, giving the name of each resource and it’s Resource Group to enable you to remediate them.