.NET 5 Azure Function (dotnet-isolated): issues subscribing it to an Event Grid topic

Alex Holloway 6 Reputation points
2021-03-11T16:40:16.993+00:00

I have created a new Azure Function App with a .NET 5 function implementation, taking advantage of the newly-out-of-preview .NET Isolated support from https://github.com/Azure/azure-functions-dotnet-worker/ . I want this app to handle events from Event Grid.

There are two functions in the application:

  • one with an Event Grid trigger
  • one with a HTTP trigger

Both triggers work as expected when debugging the application locally.

When deployed, I can successfully use az eventgrid event-subscription create --event-type webhook ... to subscribe the HTTP trigger function to my Event Grid topic. Everything works as expected. (I added my own implementation of the Event Grid handshake to the HTTP function.)

However, if I try to subscribe the Event Grid trigger function to my Event Grid topic with az eventgrid event-subscription create --event-type azurefunction ... I instead get an error:

Deployment failed. Correlation ID: 9c0e3d2f-9591-46f0-9581-adf3f00877d9. The operation failed due to an internal server error. The initial state of the impacted resources (if any) are restored. Please try again in few minutes. If error still persists, report 1b81e514-92f6-4b5e-a36c-ab5fbb44a861:3/11/2021 4:25:26 PM (UTC) to our forums for assistance or raise a support ticket .

I notice that if I try to use the Azure Portal web pages to create a subscription, selecting the "Azure Function" endpoint type, no functions are enumerated in my function app ("no available items" is shown). I also notice that in the Function app in Azure Portal, my functions are listed in the table but with the Trigger field blank.

Since the HTTP trigger works I do have a working deployment but it would be good to get the Event Grid trigger working -- can anyone help? Thanks!

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,299 questions
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
319 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 68,641 Reputation points
    2021-03-12T09:58:54.667+00:00

    Hi @Alex Holloway

    Welcome to Microsoft Q&A! Thanks for posting the question.

    Looking into the above tracking ID details from the event grid end I can see that the function Work****Gridfunction was not in the active state therefore the event grid subscription creation was failed.

    I do see that you have already created the github issue here and the team is already looking into it.

    0 comments No comments