-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Defining the subscription is mandatory sometimes #27586
Copy link
Copy link
Open
Labels
ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAuto assign by botAuto-ResolveAuto resolve by botAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamCognitive Servicesaz cognitiveservicesaz cognitiveservicesService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-codegen-extensibility-squadact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues 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 thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
Metadata
Metadata
Assignees
Labels
ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAuto assign by botAuto-ResolveAuto resolve by botAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamCognitive Servicesaz cognitiveservicesaz cognitiveservicesService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-codegen-extensibility-squadact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues 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 thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Type
Fields
Give feedbackNo fields configured for issues without a type.
Describe the bug
Subscription must be defined if you have basic user permissions to the subscription
According to the document, this should work:
Set-AzContext --SubscriptionName "1234"
az group list --output table
But it gives an empty result if you have basic permissions to the subscription.
On the other hand this works still:
Set-AzContext --SubscriptionName "1234"
az group list --output table --SubscriptionName "1234"
Related command
Other az commands have the same issue, such as az cognitiveservices account show
Errors
Empty result, which is wrong result
Issue script & Debug output
Set-AzContext --SubscriptionName "1234"
az group list --output table --SubscriptionName "1234"
Expected behavior
Lists resource groups in the subscription that you have access to.
Environment Summary
azure-cli 2.49.0 *
core 2.49.0 *
telemetry 1.0.8 *
Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0
Additional context
There is another defect as well with this command in an unusual environment, but I didn't figure out how to solve that.