Skip to content

az eventgrid system-topic event-subscription create - unable to handle/validate webhook endpoint with multiple query parameters correctly. #28286

@vtjc2002

Description

@vtjc2002

Describe the bug

When using az eventgrid system-topic event-subscription create to create an event-subscription and it validates the webhook endpoint, it does not send the query parameters beyond the 1st one.

Repo:

  1. Create a system topic with az eventgrid system-topic create command to create a Microsoft.Storage.StorageAccounts topic
  2. set $endpoint = "https://${functionAppUrl}/runtime/webhooks/blobs?functionName=Host.Functions.MyFunctionEventTrigger&code=$functionKey"
  3. run az eventgrid system-topic event-subscription create --name scanned-images-blob-created --system-topic-name scanned-items-blobs-topic --endpoint-type "WebHook" --resource-group $resourceGroup --endpoint $endpoint

The code is the system key to the Azure function. The command errors out with "'code' is not recognized as an internal or external command,
operable program or batch file."

Related command

az eventgrid system-topic event-subscription create

Errors

'code' is not recognized as an internal or external command,
operable program or batch file.

if I switch code and functionName around it will say:
'functionName ' is not recognized as an internal or external command,
operable program or batch file.

Issue script & Debug output

'code' is not recognized as an internal or external command,
operable program or batch file.

Expected behavior

It should validate the webhook endpoint using the entirety of the url+query parameters.
This works when using portal.azure.com

Environment Summary

azure-cli 2.56.0

core 2.56.0
telemetry 1.1.0

Extensions:
aks-preview 0.5.149
fleet 0.2.7

Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\johnsontseng.azure\cliextensions'

Python (Windows) 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botEvent Gridaz eventgridService AttentionThis issue is responsible by Azure service team.act-codegen-extensibility-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions