Asked by:

InsufficientAccessToResource : Cannot access 'appinsightsstage-party' with the current credentials

Question

Am try to create new alert in loganalytics of type "Custom log search". In the query window when in enter app('someappinsightinmysubscription').exceptions and hit tab to move to next field i get error saying "query syntax error".
but using chrome developer tools in inspect ajax call made to microsoft sight to parse query and response is a error message as shown below.

We gave contributor access to loganalytics but still error persists. please advise.

{"error":{"message":"The request had some invalid properties","code":"BadArgumentError","details":[{"code":"InsufficientAccessToResource","message":"Cannot access 'appinsightsstage-party' with the current credentials","target":"query","value":"appinsightsstage-party"}],"innererror":{"code":"BadArgumentError","message":""}}}

All replies

A good place to start would be the documentation on
Log alerts in Azure Monitor, however this appears to be a credentials/access issue. Have you confirmed that you are using the correct credentials and that those credentials have access?

If the intent is to create an alert for number of exceptions you are seeing for your application in Application Insights , you can follow the below steps. This should also help to evaluate your permissions to run the queries as well.

As soon as we try to create an alert for any one of our Web Apps this way we get a Query Syntax Error and the above message in the browser dev console.

I have a hunch this is related to our workspace having been migrated from an OMS preview account or something

I've raised a support request over this as we're only able to alert on about 40% of our web apps that were connected to OMS using the now deprecated App Insights Connector which did the job perfectly imho.