Skip to content

az monitor app-insights query: -a argument doesn't work with GUID when resource group is specified #26574

@aimbrenda

Description

@aimbrenda

Describe the bug

Using the command

az monitor app-insights query -a "GUID" -g "MyResourceGroup"

Is resulting in resource not found but it works when I specify the app insight name
Without resource group name it works with GUID

Related command

az monitor app-insights query -a "GUID" -g "MyResourceGroup"

Errors

Resource Not Found

Issue script & Debug output

2023-05-31T14:30:17.7779274Z ERROR: (ResourceNotFound)

Expected behavior

Resource found

Environment Summary

2023-05-31T14:29:13.5282467Z azure-cli 2.48.1 *
2023-05-31T14:29:13.5288488Z
2023-05-31T14:29:13.5366054Z core 2.48.1 *
2023-05-31T14:29:13.5396371Z telemetry 1.0.8
2023-05-31T14:29:13.5712027Z
2023-05-31T14:29:13.5716902Z Extensions:
2023-05-31T14:29:13.5723454Z azure-devops 0.26.0
2023-05-31T14:29:13.5725391Z
2023-05-31T14:29:13.5727305Z Dependencies:
2023-05-31T14:29:13.5729557Z msal 1.20.0
2023-05-31T14:29:13.5731757Z azure-mgmt-resource 22.0.0

Additional context

No response

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAuto-ResolveAuto resolve by botMonitoraz monitorMonitor - ApplicationInsightsService AttentionThis issue is responsible by Azure service team.bugThis 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.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions