Logic Apps Event Grid trigger not firing

Event Grid allows to build reactive applications, based on out-of-the-box events from within the Azure ecosystem.  Logic Apps has native support for Event Grid, but lately I’ve encountered an issue that I want to share with you.

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.

EG1

First, I wanted to test if the Logic App fired, to validate the trigger information and to fine-tune the filters.  Therefor, I’ve 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:

EG2

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.

EG3

To further investigate, I consulted the Activity Log of the resource group.  There I noticed a failed Write Event Subscription.

EG4

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 indeed not registered.

EG5

I clicked on the Register command and after a while, the provider was successfully registered.

EG6

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!

EG7

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 helpfull to further troubleshoot.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s