Skip to content

VSCodeCredential CredentialUnavailableError on Linux #11914

@chlowell

Description

@chlowell

VSCodeCredential may raise an error stating no user is logged in even when one is:

>>> from azure.identity import VSCodeCredential
>>> VSCodeCredential().get_token('scope')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/site-packages/azure/identity/_credentials/vscode_credential.py", line 57, in get_token
    raise CredentialUnavailableError(message="No Azure user is logged in to Visual Studio Code.")
azure.identity._exceptions.CredentialUnavailableError: No Azure user is logged in to Visual Studio Code.

This occurs on Linux when using Python 2.7, and when using Python 3.8 on some distros.

Related: #11738

Metadata

Metadata

Assignees

Labels

Azure.IdentityClientThis issue points to a problem in the data-plane of the library.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions