Azure / Azure/azure-cli

Event Grid sys topic subscription

Open
#21,006 7 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad customer-reported Event Grid needs-team-attention Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

I'm trying to create with az cli an Event grid system topic subscription but it fails with the foloowing error:

"statusMessage": "{\"status\":\"Failed\",\"error\":{\"code\":\"ResourceOperationFailure\",
\"message\":\"The resource operation completed with terminal provisioning state 'Failed'.\",\"details\":[{\"code\":\"Url validation\",
\"message\":\"Webhook validation handshake failed for https://mylogicapp.azurewebsites.net/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/84aa5895b4324710853436be49fed029/triggers/When_a_resource_event_occurs/paths/invoke.
Http POST request failed with response code Unknown. For troublehooting, visit https://aka.ms/esvalidation. Activity id:9d3516d8-75ee-4923-bf54-a19f15631fbf, timestamp: 1/16/2022 8:56:35 PM (UTC).\"}]}}",

`Connect-AzAccount
$subscription = 'subid'
$ResourceGroupName = 'myrg'
Set-AzContext -Subscription $subscription

az eventgrid system-topic event-subscription create --name 'testsub' `
-g $ResourceGroupName --system-topic-name my-systopic `
--included-event-types Microsoft.Storage.BlobCreated `
--subject-begins-with '/blobServices/default/containers/mycontainer/blobs' `
--enable-advanced-filtering-on-arrays true `
--endpoint "https://mylogicapp.azurewebsites.net/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/84aa5895b4324710853436be49fed029/triggers/When_a_resource_event_occurs/paths/invoke?api-version=2018-11-01&code=myWorkflowcode&sp=%2Ftriggers%2FWhen_a_resource_event_occurs%2Frun&sv=1.0&sig=mysigvalue"`

but when I create the subscription manualy via Azure portal it works fine. I suspects the validation handshake via powershell is not taken care of url queries and stops at "Invoke"

For minformation my workflow test has a logic to validate the handshake to retun validation code.

any help please?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.