Skip to content

Event Grid sys topic subscription #21006

@hichamveo

Description

@hichamveo

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Event Gridaz eventgridService AttentionThis issue is responsible by Azure service team.act-codegen-extensibility-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionThis issue needs attention from Azure service team or SDK team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions