How can I create an event subscription with power shell command such that the endpoint iof this subscription is an Azure Function

Michael 1 Reputation point
2020-06-13T00:54:48.487+00:00

I am trying to create an event subscription with powershell command such that the endpoint is an Azure function. Does anybody know what I am supposed to put as the endpoint for the Azure fucntion?. I tried both the masterkey and systemkey URL of the function but the command failed.

Here are my details

resourcegroupname: nigrgp

topic name: nigtopic

function name: nigfunction

endpont: azltrialfuncapp.azurewebsites.net/runtime/webhooks/EventGrid?functionName=nigfunction&code=W/KKKKKKKKKKKKKKKKKEEEEEEEEEEEEEEEEEEEEEEYYYYYYYYYYYYYYYYYYYY==

subscription name: nigSubscription

New-AzEventGridSubscription -ResourceGroup nigrgp -TopicName nigtopic -Endpoint azltrialfuncapp.azurewebsites.net/runtime/webhooks/EventGrid?functionName=nigfunction&code=W/KKKKKKKKKKKKKKKKKEEEEEEEEEEEEEEEEEEEEEEYYYYYYYYYYYYYYYYYYYY== -EventSubscriptionName nigSubscription
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,211 questions
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
311 questions
{count} votes

2 answers

Sort by: Most helpful
  1. femi Aladesulu (MSFT) 191 Reputation points
    2020-06-19T07:33:22.957+00:00

    Hello Michael-5260 ,

    In addition to @MikeUrnun's update, take a peek at this solution that addresses a similar scenario.

    10412-stackflow.png

    0 comments No comments

  2. anggi lestari 1 Reputation point
    2021-10-30T05:52:44.573+00:00

    I have similar case

    0 comments No comments