Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated 'get_azure_cli_credentials' #6

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

mowtschan
Copy link
Contributor

Replace deprecated get_azure_cli_credentials :

Traceback (most recent call last):
  File "/Users/username/Library/Python/3.8/bin/az-switch", line 8, in <module>
    sys.exit(main())
  File "/Users/username/Library/Python/3.8/lib/python/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/Users/username/Library/Python/3.8/lib/python/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/Users/username/Library/Python/3.8/lib/python/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/username/Library/Python/3.8/lib/python/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/username/Library/Python/3.8/lib/python/site-packages/az_account_switcher/az_account_switcher.py", line 41, in main
    _, subscription_id = get_azure_cli_credentials()
  File "/Users/username/Library/Python/3.8/lib/python/site-packages/azure/common/credentials.py", line 138, in get_azure_cli_credentials
    raise NotImplementedError(
NotImplementedError: The public API of azure-cli-core has been deprecated starting 2.21.0, and this method can no longer return a valid credential. If you need to still use this method, you need to install 'azure-cli-core<2.21.0'. You may corrupt data if you use current CLI and old azure-cli-core. See also: https://aka.ms/azsdk/python/identity/migration

@abij
Copy link
Owner

abij commented Feb 24, 2022

thx, ill have a look tomorrow and test it.

@abij abij merged commit 2e35f53 into abij:master Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants