`az storage account list`返回一个空列表,尽管它在过去有效

问题描述 投票:0回答:1

我已使用

登录
az login

但是现在

az storage account list

返回一个空列表。我目前在

synapse
azure
上使用许多不同的帐户,包括本地
Pycharm
以及
ms.portal
synapse
dev
网站上的帐户。那么为什么它不再起作用了?

这是我的版本

az --version
azure-cli                         2.53.0

core                              2.53.0
telemetry                          1.1.0

Dependencies:
msal                            1.24.0b2
azure-mgmt-resource             23.1.0b2

Python location '/usr/local/Cellar/azure-cli/2.53.0/libexec/bin/python'
Extensions directory '/Users/stephenboesch/.azure/cliextensions'

Python (Darwin) 3.10.13 (main, Aug 24 2023, 22:48:59) [Clang 14.0.3 (clang-1403.0.22.14.1)]

Legal docs and information: aka.ms/AzureCliLegal


Your CLI is up-to-date.

这里是

az account show

$az account show
{
  "environmentName": "AzureCloud",
  "homeTenantId": "*****b47",
  "id": "****499",
  "isDefault": true,
  "managedByTenants": [],
  "name": "Azure Portal Telemetry Reporting",
  "state": "Enabled",
  "tenantId": "*******b47",
  "user": {
    "name": "[email protected]",
    "type": "user"
  }
}
azure azure-cli
1个回答
0
投票

az 存储帐户列表返回空列表。

当我尝试使用以下所有命令时,我也在我的环境中得到相同的空列表。

az account clear 
az login
az account set --subscription "xxxxx"

当我尝试使用相同的命令时

az storage account list

PS C:\Users\xxx> az storage account list                                           
[]
PS C:\Users\xxx> 

上述命令采用在您的环境中没有存储帐户的特定资源组。

检查

az config get
,它将显示您是否有默认资源组。

如果存在,请尝试使用以下命令将其删除:

az config unset defaults.group

上述命令删除默认资源组。

现在我运行相同的命令,它显示了所有存储帐户:

输出: enter image description here

参考:

az 存储帐户列表未列出所有存储帐户,作者:evelyn-ys。

© www.soinside.com 2019 - 2024. All rights reserved.