Scenario
I’ve created a new Logic App from scratch and configured the When a resource event occurs trigger. This trigger is listening for any resource event within a specific resource group.
First, I wanted to test if the Logic App fired, to validate the trigger information and to fine-tune the filters. For this I created a new resource, but the Logic App didn’t fire.
Troubleshooting
My first guess was that something was wrong with the registration of the trigger in Azure Event Grid. However, the trigger history showed a green status:
When I looked at the details of the successful trigger registration, I noticed that the provisioningState was Creating. So probably I was dealing with an async registration and something went wrong in the background task.
To further investigate, I consulted the Activity Log of the resource group. There I noticed a failed Write Event Subscription.
In the details of this failed activity, I found the following exception: The Microsoft.EventGrid resource provider is not registered in subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. To resolve this, register the provider in the subscription and retry the operation.
Solution
In order to solve the issue, I navigated to the Resource Providers blade of my subscription. Indeed, it showed that the Microsoft.EventGrid provider was not registered.
I clicked on the Register command and after a while, the provider was successfully registered.
I disabled and re-enabled the Logic App again, to ensure that the trigger got registered again. After this intervention, the Logic App fires based upon each resource group event!
Conclusion
When a Logic App is not firing, it’s good to have a look at the trigger history and its details. The Activity Log is always very helpful to further troubleshoot.
Subscribe to our RSS feed