question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az event-grid event-subscription list does not show all subscriptions

See original GitHub issue

az feedback auto-generates most of the information requested below, as of CLI version 2.5.1 (Azure CloudShell) & 2.6.0 (local install)

Describe the bug When using the following command with an Azure Storage Account not all subscriptions on the Account are included in the output.

az eventgrid event-subscription list --source-resource-id $resourceid

In my case I have a storage account that has a Logic App and Azure Function (Consumption Plan) subscription - both filtered for the BlobCreated Event.

Only the Logic App subscription appears in the command output. Even recreating the Function App connection makes no difference, despite the Function being triggered by Events published to the Topic.

To Reproduce

  1. Create Azure Storage Account
  2. Create Azure Logic App and add Subscription for Azure Storage Account BlobCreated Event.
  3. Create Azure Function (C#) and add Subscription for Azure Storage Account BlobCreated Event.
  4. Log into CloudShell and lookup Resource ID for Storage Account.
  5. Invoke command to list subscriptions with this Resource ID.

Expected behavior

All Subscriptions for the supplied Resource ID are displayed.

Environment summary

Using Azure Cloud Shell (2.5.1) and the local install (2.6.0) is running on Windows 10.

Additional context

All components involved were moved between Resource Groups in the same Azure Subscription after the Event Grid subscriptions were setup. The recreation of the Functions subscription was done after the move but did not result in a change in behaviour.

The solution works fine (new Events trigger both the Logic App and the Function), so this problem appears to be tied to enumerating subscriptions using the command.

Same behaviour occurs when using PowerShell Cmdlets.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ahamad-MScommented, Jun 3, 2020

Thanks for reporting this issue @sjwaight … Can you please provide additional info for us to help investigate this issue:

  1. Can you please provide us the out of az version (This allows us to determine if you are using GA’ed CLI or CLI extension).

  2. If you not using Event Grid extension, will you be able to use latest CLI event grid extension (0.4.9)? and see if this repro the issue?

  3. Can you please provide when the move was done for the resources? Date/Time?

  4. Can you please provide when the list operation was done?

  5. Please provide full information about: a. The Azure Sub Id b. Resource Group c. Event subscriptions names expected to be listed? d. Region e. Date/Time for list and move operation.

If you prefer to share this info privately, please either email me directly at (ahamad@microsoft.com) or (Ask Event Grid askgrid@microsoft.com)

Thanks

0reactions
sjwaightcommented, Jun 17, 2020

Noting here that installing the extension and not just using the currently shipped CLI capabilities has resolved my issue. As per Ashraf’s feedback this will be fixed completely in a future CLI release and until then ensure you have the extension installed using

az extension add -n eventgrid
Read more comments on GitHub >

github_iconTop Results From Across the Web

az eventgrid event-subscription - Microsoft Learn
A space-separated list of event types (e.g., Microsoft.Storage.BlobCreated and Microsoft.Storage.BlobDeleted). In order to subscribe to all default event types, ...
Read more >
Error when trying to show an event subscription in Azure CLI ...
I have an Azure Event Grid subscription, which is returned when I run the following code:- az eventgrid event-subscription list ...
Read more >
Microsoft.Azure.PowerShell.Cmdlets.EventGrid.dll-Help.xml
If the event subscription name is not provided, a list of all event subscriptions is returned. The number of elements returned in this...
Read more >
azure-cli-eventgrid - PyPI
domain create/update/delete/get/list : Added new commands for the domain CRUD ... This can now be achieved using az eventgrid event-subscription show ...
Read more >
Lab 09: Publish and subscribe to Event Grid events
As a result, the lab instructions and lab steps might not align correctly. ... On the Event Grid Topic blade, select + Event...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found