Package: azure-cli
Version: 2.87.0-1
Severity: normal
Dear Maintainer,
*** Reporter, please consider answering these questions, where
appropriate ***
* What led up to the situation?
My organization removed my Azure subscriptions. I'm still able to use
Azure "Enterprise Applications" from the portal
* What exactly did you do (or not do) that was effective (or
ineffective)?
az login --allow-no-subscriptions
* What was the outcome of this action?
A web browser has been opened at
https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize.
Please continue the login in the web browser. If no web browser is
available or if the web browser fails to open, use device code flow with
`az login --use-device-code`.
Retrieving tenants and subscriptions for the selection...
The following tenants don't contain accessible subscriptions. Use `az
login --allow-no-subscriptions` to have tenant level access.
e6170c30-202d-4926-b525-b8b882873f3b 'MyCompany'
The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not callable
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File
"/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py",
line 677, in execute
raise ex
File
"/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py",
line 820, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File
"/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py",
line 789, in _run_job
result = cmd_copy(params)
File
"/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py",
line 335, in __call__
return self.handler(*args, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File
"/usr/lib/python3/dist-packages/azure/cli/core/commands/command_operation.py",
line 120, in handler
return op(**command_args)
File
"/usr/lib/python3/dist-packages/azure/cli/command_modules/profile/custom.py",
line 215, in login
subscriptions = profile.login(
interactive,
...<11 lines>...
subscription=subscription
)
File "/usr/lib/python3/dist-packages/azure/cli/core/_profile.py",
line 230, in login
tenant_accounts = self._build_tenant_level_accounts(bare_tenants)
File "/usr/lib/python3/dist-packages/azure/cli/core/_profile.py",
line 482, in _build_tenant_level_accounts
s = self._new_account()
File "/usr/lib/python3/dist-packages/azure/cli/core/_profile.py",
line 496, in _new_account
s = SubscriptionType()
TypeError: 'NoneType' object is not callable
To check existing issues, please visit:
https://github.com/Azure/azure-cli/issues
* What outcome did you expect instead?
Successful login
When trying in a virtualenv, it seems that versioned API SDKs are
missing. In my case, here is the content of
/tmp/venv/lib/python3.13/site-packages/azure/mgmt/resource/subscriptions:
aio/
_configuration.py
__init__.py
models.py
_operations_mixin.py
__pycache__/
py.typed
_serialization.py
_subscription_client.py
v2016_06_01/
v2018_06_01/
v2019_06_01/
v2019_11_01/
v2021_01_01/
v2022_12_01/
_version.py
All v20XX directories are missing, leading to a NoneType.
In the current form, this package is unusable for me.
Adrien
-- System Information:
Debian Release: forky/sid
APT prefers testing-debug
APT policy: (500, 'testing-debug'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 7.0.10+deb14-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE
not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages azure-cli depends on:
ii python3 3.13.9-3+b1
ii python3-azure-cli 2.87.0-1
azure-cli recommends no packages.
azure-cli suggests no packages.
-- no debconf information