question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash when running az keyvault list using a managed identity

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az keyvault list

Errors:

get_token() takes 1 positional argument but 2 were given
Traceback (most recent call last):
python3.6/site-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())
...
    response = self.next.send(request)
azure/core/pipeline/_base.py, ln 69, in send
    _await_result(self._policy.on_request, request)
azure/core/pipeline/_tools.py, ln 29, in await_result
    result = func(*args, **kwargs)
core/pipeline/policies/_authentication.py, ln 93, in on_request
    self._token = self._credential.get_token(*self._scopes)
TypeError: get_token() takes 1 positional argument but 2 were given

To Reproduce:

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

  • Assign a system managed identity to a VM
  • Give it access to a key vault
  • on the VM, log into az cli using az login --identity
  • az keyvault list tsv --query '[].name'

Expected Behavior

Environment Summary

Linux-5.3.0-1035-azure-x86_64-with-debian-buster-sid
Python 3.6.10
Installer: DEB

azure-cli 2.11.0

Additional Context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
Juliehzlcommented, Sep 16, 2020
1reaction
Juliehzlcommented, Sep 16, 2020

please try with edge build https://github.com/Azure/azure-cli#edge-builds now and official release will be available on 9/22

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Azure key vault access policy issues
The simplest way to authenticate a cloud-based application to Key Vault is with a managed identity; see Authenticate to Azure Key Vault for ......
Read more >
Not able to read Azure Key Vault secret value using System ...
For Existing VM Get the managed identity service. Assigned permission to access azure KV using-az keyvault set-policy --name "" --object-id "" ...
Read more >
Azure web app and managed identity to access key vault
This code tries to reach out to key vault and tries to get all the configurations from there. The key vault is not...
Read more >
Using KEY VAULT to Manage Azure Kuberbenetes ... - YouTube
Azure Kubernetes Service (AKS) is the flagship offering for running containers at scale on Azure. AKS integrates with many things on Azure ...
Read more >
DefaultAzureIdentity And Its Various Credential Types
One of the preferred ways is to give your component identity from Azure Active Directory (AAD) and utilize the use of AAD tokens....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found