Cannot connect to Azure VM.

Valeriy Zastavnyuk 20 Reputation points Microsoft Employee
2026-07-07T21:04:13.74+00:00

We cannot connect to an Azure VM through RDP though it is fully functional. We are using Dynamics 365 running on it. And Test-NetConnection command from PS succeeded.

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

Answer accepted by question author
Andreas Baumgarten 132.9K Reputation points MVP Volunteer Moderator
2026-07-07T22:21:02.7933333+00:00

Hi @Valeriy Zastavnyuk ,

there are 2 good troubleshooting guides available with step-by-step instructions:

Troubleshoot Remote Desktop connections to an Azure virtual machine

Detailed troubleshooting steps for remote desktop connection issues to Windows VMs in Azure

I most cases the issues are related to NSG rule configuration or routing.


(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

Regards

Andreas Baumgarten

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Newest
  1. Valeriy Zastavnyuk 20 Reputation points Microsoft Employee
    2026-07-08T17:16:41.4933333+00:00

    Thank you Andreas. You suggestion was right and I was able to find and fix the issue and connect to the VM. I found the straightforward way to diagnose what exactly blocks the connection.

    • Open Azure Portal;
    • Find and open 'Network Watcher'
    • Go to IP 'flow verify'
    • In 'Remote IP' address put Ipv4 address of your computer you are connecting from
    • In 'Remote port' put the port which is open for listening on out machine. It can be found by running cmd command
      netstat -an | findstr LISTENING
    • Click "Verify IP flow"

    In the response window it shows an exact name of NSG rule which clocks the connection.

    Was this answer helpful?

    0 comments No comments

  2. Valeriy Zastavnyuk 20 Reputation points Microsoft Employee
    2026-07-08T17:12:13+00:00

    Thank you Andreas. You suggestion was right and I was able to find and fix the issue and connect to the VM. I found the straightforward way to diagnose what exactly blocks the connection.

    • Open Azure Portal;
    • Find and open 'Network Watcher'
    • Go to IP 'flow verify'
    • In 'Remote IP' address put Ipv4 address of your computer you are connecting from
    • In 'Remote port' put the port which is open for listening on out machine. It can be found by running cmd command
      netstat -an | findstr LISTENING
    • Click "Verify IP flow"

    In the response window it shows an exact name of NSG rule which clocks the connection.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.