az login fails unexpectedly "NotImplementedError: APIVersion 2019-06-01 is not available"
See original GitHub issueThis is autogenerated. Please review and update as needed.
Describe the bug
az login fails unexpectedly, in the same environment and docker container where it always was working, very strange. 100% reproducible, fails all the time.
Command Name
az login
Errors:
APIVersion 2019-06-01 is not available
Traceback (most recent call last):
python3.6/dist-packages/knack/cli.py, ln 215, in invoke
cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 654, in execute
raise ex
cli/core/commands/__init__.py, ln 718, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 711, in _run_job
six.reraise(*sys.exc_info())
...
azure/cli/core/_profile.py, ln 865, in find_from_service_principal_id
result = self._find_using_specific_tenant(tenant, token_entry[_ACCESS_TOKEN])
azure/cli/core/_profile.py, ln 960, in _find_using_specific_tenant
subscriptions = client.subscriptions.list()
mgmt/resource/subscriptions/subscription_client.py, ln 132, in subscriptions
raise NotImplementedError("APIVersion {} is not available".format(api_version))
NotImplementedError: APIVersion 2019-06-01 is not available
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…
az login --service-principal --username {} --password {} --tenant {} --debug
Expected Behavior
Login to work, was always working
Environment Summary
Linux-3.10.0-1062.12.1.el7.x86_64-x86_64-with-Ubuntu-18.04-bionic
Python 3.6.9
Installer: PIP
azure-cli 2.7.0 *
Additional Context
Getting error, but it worked just recently, what might cause this?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
az login fails with "NotImplementedError: APIVersion 2019-06 ...
Describe the bug Command Name az login Errors: APIVersion 2019-06-01 is not available Traceback (most recent call last): ...
Read more >az acr build command fails "NotImplementedError: APIVersion ...
The command fails with the following error: APIVersion 2019-06-01-preview is not available Traceback (most recent call last): File ...
Read more >Terraform with AZ suddenly stopped working - Microsoft Q&A
Working with Terraform and AZ Cli. It was all working fine, but suddenly today Terraform gives me following error.
Read more >azure-cli: az webapp commands failing: API version 2022-03 ...
az webapp list. The command failed with an unexpected error. Here is the traceback: API version 2022-03-01 does not have operation group 'web_apps'...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
got it 😃)) I referred to the “azure” python package. because the error appears when I upgrade from 4.x to 5. but it works now, so it’s ok. And thank you for the information, it’s appreciated!
Hi @Dmitry1987, I am glad the issue is solved.
However, the current Azure CLI version is 2.9.1. We haven’t reached 4.0 or 5.0 yet. 😉
https://github.com/Azure/azure-cli/blob/b01fbe373a059aa6c746e6e067aac4ac77323211/src/azure-cli-core/setup.py#L20
I tested with both formats of
--username
and they all work correctly:Per the debug log, the error is irrelevant to login but to listing subscriptions:
I would still recommend checking the installation.