Azure / Azure/azure-cli

az monitor activity-log list command not working for a particular resource

Open
#30,204 1 comment 0 reactions 1 assignee Claimed by @AllyW View on GitHub
act-observability-squad Auto-Assign Azure CLI Team bug customer-reported Monitor potential-pruning
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

Env: Macbook M1 Pro

- Installed latest azure cli "2.65.0_2"
- Tried to run this command - az monitor activity-log list -g "$rsg" --resource-id "$rsid" --offset 30d

I Expected that the cli to filter events by the resource-id specified. But, it returns all the events in the resource group.

### Related command

az monitor activity-log list -g "$rsg" --resource-id "$rsid" --offset 30d

### Errors

No Error. --resource-id flag is ignored

### Issue script & Debug output

az monitor activity-log list -g "$rsg" --resource-id "$rsid" --offset 30d

### Expected behavior

The result should only list events for the specified resource-id

### Environment Summary

{
"azure-cli": "2.65.0",
"azure-cli-core": "2.65.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
}

### Additional context

looks like a similar issue was reported in year 2021 which was fixed in a later azure cli version - https://github.com/Azure/azure-cli/issues/16485

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.