Error 13 ‘az network’ Permission Denied (conn.rdp)
See original GitHub issueThis is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az network bastion rdp
Errors:
The command failed with an unexpected error. Here is the traceback:
[Errno 13] Permission denied: 'conn.rdp'
Traceback (most recent call last):
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/network/custom.py", line 8487, in rdp_bastion_host
PermissionError: [Errno 13] Permission denied: 'conn.rdp'
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information. Please see https://petri.com/azure-bastion-native-client-support/#Error_13_8216az_network8217_Permission_Denied_connrdp
- Put any pre-requisite steps here…
az network bastion rdp --name {} --resource-group {} --target-resource-id {} --only-show-errors
Expected Behavior
The native RDP client opens and connects to the VM. (as it does when the session runs as an administrator)
Environment Summary
Windows-10-10.0.22000-SP0
Python 3.10.5
Installer: MSI
azure-cli 2.38.0
Additional Context
Issue Analytics
- State:
- Created a year ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Access is denied error when you connect to an Azure ...
Resolves an access denial problem that occurs when you try to connect to an Azure Windows VM by using Remote Desktop.
Read more >Azure Bastion Native Client Support With the Windows RDP ...
Error 13 'az network' Permission Denied (conn.rdp); Log in to Azure using the Azure CLI and set the working subscription; Launch the RDP ......
Read more >Log in with RDP to a Windows Azure VM using Azure AD ...
In this article, we will show you how to log in with Remote Desktop (RDP) to a Windows virtual machine deployed in Azure...
Read more >Windows Server error "Access is denied (Exception from ...
The Windows Server error "Access is denied (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" is returned when running a Discovery, Orchestration, ...
Read more >Securing Remote Desktop (RDP) for System Administrators
Remote Desktop sessions operate over an encrypted channel, preventing anyone from viewing your session by listening on the network.
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
@navba-MSFT I am getting the same error when I attempt to connect to RDP through Bastion command line. I don’t see conn.rdp anywhere to delete. What else can I try?
Edit: Disregard this - I realized that within command prompt, I was in the directory that contained the “az” file and because i don’t have permissions to write in there, it wasn’t able to create the conn.rdp file. Once i changed to my local directory i was able to run the command. Different issue now but at least it got me past this.
@FalkoWienBBT I wasn’t able to reproduce this issue at my end. Could you please delete the existing conn.rdp file and then launch the cmd prompt using Admin mode ( Run As Administrator) and then navigate to the folder where you need the conn.rdp file to be created and then run the below command again.
Awaiting your reply.