I'm trying to create EventGridSubscription for Azure Function that uses EventGridTrigger. When running New-AzureRmEventGridSubscription cmdlet i see the following error:
Url validation: The attempt to validate the provided endpoint https://blablafunction.azurewebsites.net/admin/EventGridExtensionConfig failed.
Here is azure function code:
[FunctionName("BlobCreatedHandler")]
public static async Task Run([EventGridTrigger]JObject blobEvent,
[Queue("blob-created-queue", Connection = Strings.StorageAccountConnection)] CloudQueue blobCreatedQueue,
[Inject(typeof(IBlobCreatedHandler))] IBlobCreatedHandler blobCreatedHandler)
{
await blobCreatedHandler.Handle(blobEvent, blobCreatedQueue);
}
I tried different versions of AzureRM.EventGrid module. Interesting thing that on versions lower than 0.3.0 it works fine. But all recent versions starting from 0.3.1 are failing with this error. Does someone experience the same?
UPD: Fiddler says that both versions of SDK (good one and bad one) send absolutly identical requests:
{
"properties": {
"destination": {
"endpointType": "WebHook",
"properties": {
"endpointUrl": "https://blobmalwarescanapptest.azurewebsites.net/admin/EventGridExtensionConfig?functionName=TestFunc&code=PhWghMXtSma188UQccaoErA4Eiw7ygudguHkpq1V0XKMfzA59yBR5g=="
}
},
"filter": {
"includedEventTypes": [
"All"
],
"isSubjectCaseSensitive": false
}
}
and get absolutely the same responses. But on newer versions of SDK seems like Azure EventGrid managing endpoint truncates everything that goes after '?' sign and tries to validate base url (without query parameters).