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 sentinel alert-rule-action list uses unavailable api version

See original GitHub issue

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command az sentinel alert-rule action list -g somerg -w someworkspace --rule-name ‘/subscriptions/somesubscritpion/resourceGroups/somergsentinel/providers/Microsoft.OperationalInsights/workspaces/someworkspace/providers/Microsoft.SecurityInsights/alertRules/ruleidentifier’ --debug

Describe the bug

Unable to list alert-rule actions using az-cli, when invoking a request it uses api that is not available, in the request when it is being made (–debug) I can see that it ends with:

image


/actions?api-version=2022-06-01-preview

image Same with current preview for az alert-rule action 2022-07-01-preview image

To Reproduce

Simply create alert rule, add an action on trigger and attempt to list it using mentioned command

Expected behavior

Command should list alert rule actions

Environment summary

azure-cli 2.42.0 core 2.42.0 telemetry 1.0.8

Extensions: account 0.2.5 sentinel 0.2.0

Dependencies: msal 1.20.0 azure-mgmt-resource 21.1.0b1

Python location ‘C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe’ Extensions directory ‘C:\Users\xxxx.azure\cliextensions’

Python (Windows) 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:37:59) [MSC v.1933 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Kaloszercommented, Dec 7, 2022

Then I guess it works as designed - it would be nice if the documentation specifically said you cannot use the full identifier but have to use the individual name!

Thanks for investigating

1reaction
SaurabhSharma-MSFTcommented, Dec 7, 2022

@Kaloszer I do not think it is possible as Actions - List By Alert Rule REST API doesn’t work with the whole resource identifier and throwing similar errors. image

Read more comments on GitHub >

github_iconTop Results From Across the Web

az sentinel alert-rule - Microsoft Learn
This reference is part of the sentinel extension for the Azure CLI (version 2.37.0 or higher). The extension will automatically install the first...
Read more >
Why do some API versions in azure devops not work with ...
Azure DevOps Services support all previous API-versions out of the box, the self hosted version (Azure DevOps server) support all previous ...
Read more >
Azure Sentinel Alert Rules and Alert Management - Bobcares
The azure sentinel alert rules lets the users to setup and manage rules that triggers alerts on threats and other security issues.
Read more >
Get all the available api-version options for Azure Resource ...
there's a few tricks I'm doing to list all available versions of a provider ... Get available Azure Resource Manager API Versions with...
Read more >
How to get Azure Sentinel Incidents via the Sentinel API - Blog
At Info Support, we use an on-premise SIEM in our security monitoring setup. We also use Azure Sentinel as Cloud SIEM for a...
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