Insufficient Permissions on Application Insights Monitor

Microsoft has a well detailed tutorial on how to install and configure Application Insights Monitor for web apps that are live. However one could always run into problems and the “insufficient permissions” error is one that could pop often on new installations. The fix however is easy and have to be done one time only.

The tutorial says you have to add the Application Pool Identity to Performance Monitor Users group. This actually translates to IIS AppPool\{Application Pool Name} unless you have setup the Application Pool to run under a service account. This can be added easily by running the following commands in an elevated (run as Administrator) PowerShell prompt.

In the example I have an Application Pool with the name CustomAppPoolName, so the local user that has to be added to Performance Monitor Users group is IIS AppPool\CustomAppPoolName.