Hello there,
Are you trying Remote Desktop Protocol (RDP) connection to your Windows-based Azure virtual machine (VM) ?
If so after each troubleshooting step, try reconnecting to the VM:
Reset Remote Desktop configuration.
Check Network Security Group rules / Cloud Services endpoints.
Review VM console logs.
Reset the NIC for the VM.
Check the VM Resource Health.
Reset your VM password.
Restart your VM.
Redeploy your VM.
You can troubleshoot VMs created using the Resource Manager deployment model by using one of the following methods:
Azure portal - great if you need to quickly reset the RDP configuration or user credentials and you don't have the Azure tools installed.
Azure PowerShell - if you are comfortable with a PowerShell prompt, quickly reset the RDP configuration or user credentials using the Azure PowerShell cmdlets.
Detailed troubleshooting steps for remote desktop connection issues to Windows VMs in Azure https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/detailed-troubleshoot-rdp
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer–