Azure / Azure/azure-cli

AZ Cli setting subscription/account asks extension install in loop mode (cannot set)

Open
#17,386 1 comment 0 reactions 1 assignee Claimed by @jiasli View on GitHub
Account act-identity-squad feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug
Setting account/subscription required downloading account or subscription plugin but even done that it asks again for download. Cannot set account/subscription from CLI

**Command Name**
`az account`

**Errors:**

## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

- _Put any pre-requisite steps here..._
- >Fresh install of Azure Cli from windows installer OR pip install azure-cli
- `az account -s {}`

## Expected Behavior
After having extension should not ask again for extension

## Environment Summary
```
Windows-10-10.0.18362-SP0
Python 3.8.8
Installer: PIP

azure-cli 2.20.0

Extensions:
account 0.2.1
subscription 0.1.4

```
## Additional Context

ADDITIONAL DEBUG LOG

PS C:\Users\MYUSERID> az account -s "Visual Studio Enterprise Subscription - MPN" --debug
cli.knack.cli: Command arguments: ['account', '-s', 'Visual Studio Enterprise Subscription – MPN', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [, , ]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'account': ['azure.cli.command_modules.profile', 'azure.cli.command_modules.resource', 'azext_account', 'azext_subscription']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: profile 0.005 2 9
cli.azure.cli.core: resource 0.012 36 171
cli.azure.cli.core: Total (2) 0.017 38 180
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: account 0.007 4 12 C:\Users\MYUSERID\.azure\cliextensions\account
cli.azure.cli.core: subscription 0.006 1 1 C:\Users\MYUSERID\.azure\cliextensions\subscription
cli.azure.cli.core: Total (2) 0.013 5 13
cli.azure.cli.core: Loaded 40 groups, 193 commands.
cli.azure.cli.core: Found a match in the command group table for 'account'.
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate []
az_command_data_logger: command args: account -s {} --debug
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\MYUSERID\.azure\commands'.
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [.add_subscription_parameter at 0x0000015F3723C790>, .register_query_examples at 0x0000015F37291B80>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [.add_ids_arguments at 0x0000015F37291C10>, .add_cache_arguments at 0x0000015F37291D30>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
The command requires the latest version of one of the following extensions. You need to pick one to install:
[1] subscription
[2] account
Please enter a choice [Default choice(1)]: 1
cli.azure.cli.core.parser: The command requires the extension subscription. It will be installed first.
cli.azure.cli.core.extension.operations: Extension 'subscription' 0.1.4 is already installed.
cli.azure.cli.core.extension.operations: It will be updated if available.
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /azure-cli-extension-index-v1 HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): azcliextensionsync.blob.core.windows.net:443
urllib3.connectionpool: https://azcliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 200 825086
cli.azure.cli.core.extension._resolve: Candidates ['subscription-0.1.3-py2.py3-none-any.whl', 'subscription-0.1.4-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['subscription-0.1.3-py2.py3-none-any.whl', 'subscription-0.1.4-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['subscription-0.1.3-py2.py3-none-any.whl', 'subscription-0.1.4-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Skipping 'subscription-0.1.3-py2.py3-none-any.whl' as 0.1.3 not greater than current version 0.1.4
cli.azure.cli.core.extension._resolve: Skipping 'subscription-0.1.4-py2.py3-none-any.whl' as 0.1.4 not greater than current version 0.1.4
cli.azure.cli.core.extension.operations: No suitable extensions found.
cli.azure.cli.core.extension.operations: No updates available for 'subscription'. Use --debug for more information.
cli.knack.cli: Command arguments: ['account', '-s', 'Visual Studio Enterprise Subscription – MPN', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [, , ]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'account': ['azure.cli.command_modules.profile', 'azure.cli.command_modules.resource', 'azext_account', 'azext_subscription']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: profile 0.003 2 9
cli.azure.cli.core: resource 0.008 36 171
cli.azure.cli.core: Total (2) 0.011 38 180
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: account 0.005 4 12 C:\Users\MYUSERID\.azure\cliextensions\account
cli.azure.cli.core: subscription 0.004 1 1 C:\Users\MYUSERID\.azure\cliextensions\subscription
cli.azure.cli.core: Total (2) 0.009 5 13
cli.azure.cli.core: Loaded 40 groups, 193 commands.
cli.azure.cli.core: Found a match in the command group table for 'account'.
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate []
az_command_data_logger: command args: account -s {} --debug
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\MYUSERID\.azure\commands'.
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [.add_subscription_parameter at 0x00000263E232D700>, .register_query_examples at 0x00000263E2381AF0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [.add_ids_arguments at 0x00000263E2381B80>, .add_cache_arguments at 0x00000263E2381CA0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
The command requires the latest version of one of the following extensions. You need to pick one to install:
[1] subscription
[2] account
Please enter a choice [Default choice(1)]:

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.