az --version Getting permission denied exception after installing Azure CLI
See original GitHub issue
az --version
Getting permission denied exception after installing Azure CLI
Describe the bug I installed Azure CLI’s latest version and have been not able to run commands over power shell or command prompt. I tried running as an Admin
C:\WINDOWS\system32> az --version
Traceback (most recent call last):
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-unpacked-wheel-d55550gx\azure\cli\core\_session.py", line 47, in load
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-unpacked-wheel-d55550gx\azure\cli\core\_session.py", line 65, in save
File "codecs.py", line 897, in open
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\mmodi\\.azure\\az.sess'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "runpy.py", line 193, in _run_module_as_main
File "runpy.py", line 85, in _run_code
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-unpacked-wheel-clkvqii1\azure\cli\__main__.py", line 35, in <module>
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-unpacked-wheel-d55550gx\azure\cli\core\__init__.py", line 848, in get_default_cli
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-unpacked-wheel-d55550gx\azure\cli\core\__init__.py", line 65, in __init__
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-unpacked-wheel-d55550gx\azure\cli\core\_session.py", line 61, in load
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-unpacked-wheel-d55550gx\azure\cli\core\_session.py", line 65, in save
File "codecs.py", line 897, in open
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\<User Name>\\.azure\\az.sess'
To Reproduce Installed Azure CLI and run any command. Ex az login , az --version
Expected behavior
az
commands should run
Environment summary
OS - Microsoft Windows 10 Enterprise (10.0.19041 Build 19041)
Azure CLI Version Installed (latest) - 2.10.1
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Permission denied exception Azure CLI - Stack Overflow
I had a similar issue, I had to run az extension add --name azure-devops Indeed, as @roman_ka states, after deleting .azure directory (in...
Read more >How do I resolve Access Denied error when trying to deploy ...
I tried to alter the dotnet version with the global.json. However when i run az webappyment source config-zip --resource-group ... i still get....
Read more >Azure CLI task always fails with permission denied because it ...
Azure CLI task always fails with permission denied because it can't create a system defined directory - Visual Studio Feedback.
Read more >Troubleshooting | LiveData Migrator for Azure
See Install the Azure CLI on Linux in the Microsoft documentation for ... az extension add --source ... If you do not, you...
Read more >How to fix docker: Got permission denied while trying to ...
I've just installed docker but I have to run it with sudo every time. If I don't add sudo I get the following...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
I have this same issue even after deleting the file. Please help
Also have the exact same problem in the cli