Issue on azure login with Pycharm
已回答
I have loggen in to azure by using the command azure njmcdirect cli command through using the command
az login
by using that command i got
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"
}
hope to solve it as i've been trying it for very logn.
请先登录再写评论。
azure.core.exceptions.ClientAuthenticationError indicates that it's an exception in Azure, not PyCharm.
well, it sounds like a specific PyCharm behaviour using WSL
I encounter the same issue when running my script inside pyCharm.
If I run the same code on the machine within a terminal, entering python shell, I do not get the error.
there is a related issue in release history of azure-identity.
Not that I face this issue with azure-identity=1.15.0 on WSL/Ubuntu 20.2
I don't face such an issue on WSL/Ubuntu22
https://pypi.org/project/azure-identity/
1.4.0b6 (2020-07-07)
AzureCliCredential
no longer raises an exception due to unexpected output from the CLI when run by PyCharm (thanks @NVolcz) (#11362)msal
version to 1.3.0AzureCliCredential
correctly invokes/bin/sh
(#12048)