Issue on azure login with Pycharm

Hi,

I logged in to azure using the azure cli command

az login

after that I am facing some issues connecting to azure resources (in my case a key vault). 

While this code works from command line:

credentials = DefaultAzureCredential()
secret_client = SecretClient(vault_url, credentials)
secret = secret_client.get_secret("PostGresConnectionString")

The code raises an exception in Pycharm:
azure.core.exceptions.ClientAuthenticationError: Unexpected output from Azure CLI: '{

****,
"expiresOn": "<date>",
"subscription": "<s_id>",
"tenant": "<t_id>",
"tokenType": "Bearer"
}

Please sign in to leave a comment.