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
- Create Azure Storage Account
- Create Azure Logic App and add Subscription for Azure Storage Account BlobCreated Event.
- Create Azure Function (C#) and add Subscription for Azure Storage Account BlobCreated Event.
- Log into CloudShell and lookup Resource ID for Storage Account.
- 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:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Thanks for reporting this issue @sjwaight … Can you please provide additional info for us to help investigate this issue:
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).
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?
Can you please provide when the move was done for the resources? Date/Time?
Can you please provide when the list operation was done?
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
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