Open tankbob opened 4 months ago
Thank you for opening this issue, we will look into it.
I actually had this happen on a colleagues machine too, he has far less horse power so it was immediately noticeable that the Datto AV (based on Avira) was CPU spiking at the same time. We added an exclusion to the antivirus for the entire CLI2 folder and the delay seems to have disappeared. Ideally I didn't want to have to do this as it leaves an attack vector for python scripts that know about this.
I'm not sure if the issue to do with pre-scanning of the python scripts going on or a specific part of the process involved triggering the AV to cause the stall. I'm going to be raising it with Datto for analysis as to why it affects the cli so badly.
I'm sorry if this has caused wasted time, unless it helps in future - maybe a Known Conflicts and issues section to be created so that others having the issue can see it's a known problem and how to work around.
Describe the bug
When trying to get an accesstoken the command takes longer than 13s to execute resulting in a token timeout error when using Azure.Identity with the AzureCLICredential.
Running
az account get-access-token --output json --resource https://vault.azure.net --tenant REDACTED --debug --verbose
Tells me
cli.__main__: Command ran in 11.756 seconds (init: 10.193, invoke: 1.562)
Using Measure-Command I'm told it takes just over 13s.
Why is it taking 10s to init, what can I do to debug why and solve the issue.
Related command
az account get-access-token --output json --resource https://vault.azure.net --tenant REDACTED --debug --verbose
Errors
No error from the command, but because it takes too long the AzureCLICredential gets a token timeout error
Issue script & Debug output
Expected behavior
Command to execute far faster, no CLI Timeout error
Environment Summary
Additional context
No response