0
votes

I'm unable to setup alerts in my Application Insights instance on Azure from portal. This is the error I receive:

Failed to create alert rule 'XWRANotification'. The client '[email protected]' with object id 'xxx-3525-48c6-97ad-xxx' does not have authorization to perform action 'microsoft.insights/scheduledqueryrules/write' over scope '/subscriptions/xxx-d404-4748-a3e8-09afe0bbea49/resourceGroups/RG-XWRA-01/providers/microsoft.insights/scheduledqueryrules/XWRANotification' or the scope is invalid. If access was recently granted, please refresh your credentials..

I've following access configured for my user on this App Insights instance:

  • Contributor
  • Application Insights Component Contributor
  • Monitoring Contributor
1
In addition to the 3 roles you listed, you need another Contributor role for the resource group which you will create your action group in. Please check it. If you already have this role, you should be able to setup the alerts. As it suggested: If access was recently granted, please refresh your credentials.Allen Wu
Got it. Thanks, it worked.Sam
Is it resolved by assigning another Contributor role for the resource group which you will create your action group in? If so, I'll add it as the answer then this post can be treated as answered. You can accept it as answer. Thank you.Allen Wu
User needs to be added to "Monitoring Contributor" role of the Resource Group containing AI instance.Sam

1 Answers

0
votes

Based on our comments, in addition to the 3 roles you listed, you need another Contributor role for the resource group which you will create your action group in.

If you already have this role, you should be able to setup the alerts. As it suggested: If access was recently granted, please refresh your credentials.