Skip to content

Commit 0d9dc5a

Browse files
authored
Merge pull request #312715 from AbdullahBell/bastion-rdp-windows-3
Overhaul of RDP Windows article
2 parents f060d9d + 5dad36b commit 0d9dc5a

3 files changed

Lines changed: 161 additions & 51 deletions

File tree

Lines changed: 110 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,157 @@
11
---
22
title: 'Connect to a Windows VM using RDP'
33
titleSuffix: Azure Bastion
4-
description: Learn how to use Azure Bastion to connect to Windows VM using RDP.
4+
description: Learn how to use Azure Bastion to connect to a Windows VM using RDP via the Azure portal, a specified IP address, or a native client.
55
author: abell
66
ms.service: azure-bastion
77
ms.topic: how-to
8-
ms.date: 03/31/2025
8+
ms.date: 03/06/2026
99
ms.author: abell
1010

1111
# Customer intent: "As a cloud administrator, I want to establish a secure RDP connection to a Windows VM using a Bastion host, so that I can access my virtual machines without exposing them to the public internet."
1212
---
1313

1414
# Create an RDP connection to a Windows VM using Azure Bastion
1515

16-
This article shows you how to securely and seamlessly create an RDP connection to your Windows VMs located in an Azure virtual network directly through the Azure portal. When you use Azure Bastion, your VMs don't require a client, agent, or additional software. You can also connect to a Windows VM using SSH. For information, see [Create an SSH connection to a Windows VM](bastion-connect-vm-ssh-windows.md).
16+
This article describes how to create a secure RDP connection to your Windows virtual machines using Azure Bastion. You can connect through the Azure portal (browser-based), via a specified IP address, or using a native client on your local Windows computer. When you use Azure Bastion, your virtual machines don't require a client, agent, or additional software. Azure Bastion securely connects to all virtual machines in the virtual network without exposing RDP/SSH ports to the public internet. For more information, see [What is Azure Bastion?](bastion-overview.md)
1717

18-
Azure Bastion provides secure connectivity to all of the VMs in the virtual network in which it's provisioned. Using Azure Bastion protects your virtual machines from exposing RDP/SSH ports to the outside world, while still providing secure access using RDP/SSH. For more information, see [What is Azure Bastion?](bastion-overview.md)
18+
For native client connections using Azure CLI (including SSH and tunnel), see [Connect to a VM using a native client](connect-vm-native-client-windows.md). To connect to a Windows virtual machine using SSH, see [Create an SSH connection to a Windows VM](bastion-connect-vm-ssh-windows.md).
1919

20-
> [!NOTE]
21-
> Entra ID authentication for RDP connections is now available in public preview! See [Microsoft Entra ID](#microsoft-entra-id-authentication-preview) for details.
20+
The following diagram shows the dedicated deployment architecture using an RDP connection.
21+
22+
:::image type="content" source="./media/connect-vm-rdp-windows/host-architecture-rdp.png" alt-text="Diagram that shows the Azure Bastion architecture." lightbox="./media/connect-vm-rdp-windows/host-architecture-rdp.png":::
2223

2324
## Prerequisites
2425

25-
Before you begin, verify that you've met the following criteria:
26+
Before you begin, verify that you meet the following criteria:
2627

27-
* A VNet with the Bastion host already installed.
28+
* An Azure Bastion host deployed in the virtual network where the virtual machine is located, or in a [peered virtual network](vnet-peering.md). To set up a Bastion host, see [Create a bastion host](quickstart-host-portal.md#createhost). The SKU you need depends on your connection method:
2829

29-
* Make sure that you have set up an Azure Bastion host for the virtual network in which the VM is located. Once the Bastion service is provisioned and deployed in your virtual network, you can use it to connect to any VM in the virtual network.
30-
* To set up an Azure Bastion host, see [Create a bastion host](quickstart-host-portal.md#createhost). If you plan to configure custom port values, be sure to select the Standard SKU or higher when configuring Bastion.
30+
| Connection method | Minimum SKU | Additional configuration |
31+
|---|---|---|
32+
| Azure portal (browser) | Basic | None |
33+
| Azure portal with custom ports | Standard | None |
34+
| IP-based connection | Standard | [IP-based connection](connect-ip-address.md#configure-bastion) enabled |
35+
| Native client (RDP) | Standard | [Native client support](native-client.md) enabled |
3136

32-
* A Windows virtual machine in the virtual network.
37+
* Users connecting via RDP must have rights on the target virtual machine. If the user isn't a local administrator, add them to the **Remote Desktop Users** group.
3338

34-
### Required roles
39+
* Azure Bastion uses RDP port 3389 by default. Custom ports require the [Standard SKU or higher](bastion-sku-comparison.md). To upgrade, see [Upgrade a SKU](upgrade-sku.md).
3540

36-
* Reader role on the virtual machine.
37-
* Reader role on the NIC with private IP of the virtual machine.
38-
* Reader role on the Azure Bastion resource.
39-
* Reader role on the virtual network of the target virtual machine (if the Bastion deployment is in a peered virtual network).
41+
* A Windows virtual machine in the virtual network (or reachable from the virtual network for [IP-based connections](connect-ip-address.md)).
4042

41-
## Microsoft Entra ID authentication (Preview)
43+
* **Required roles:**
4244

43-
> [!NOTE]
44-
> Microsoft Entra ID Authentication support for RDP connections within the portal is only supported for Windows VMs. For SSH connections to Linux VMs, see [Connect to a Linux VM using SSH](bastion-connect-vm-ssh-linux.md#microsoft-entra-id-authentication).
45+
* Reader role on the virtual machine.
46+
* Reader role on the NIC with the IP of the virtual machine.
47+
* Reader role on the Azure Bastion resource.
48+
* Reader role on the virtual network of the target virtual machine (if the Bastion deployment is in a peered virtual network).
49+
* Virtual Machine Administrator Login or Virtual Machine User Login role (only required for [Microsoft Entra ID authentication](bastion-entra-id-authentication.md)).
50+
51+
52+
See the [Azure Bastion FAQ](bastion-faq.md) for additional requirements.
53+
54+
<a name="entra-id"></a>
55+
56+
## Authentication methods
57+
58+
<a name="microsoft-entra-id-authentication-preview"></a>
4559

46-
If the following prerequisites are met, Microsoft Entra ID becomes the default option to connect to your VM. If any prerequisite is not met, Microsoft Entra ID will not be presented as a Connection Method. To learn more about Entra ID authentication for Azure machines, see [Enable Microsoft Entra sign in for a Windows virtual machine in Azure or Arc-enabled Windows Server](/entra/identity/devices/howto-vm-sign-in-azure-ad-windows#enable-microsoft-entra-sign-in-for-a-windows-virtual-machine-in-azure-or-arc-enabled-windows-server)
60+
The following authentication methods are available for RDP connections through Azure Bastion. Select an authentication method to see the corresponding steps.
4761

48-
Prerequisites:
49-
* Ensure that your virtual machine is compliant with the following requirements: Windows 10 version 20H2 or later, Windows 11 21H2 or later, or Windows Server 2022 or later.
62+
| Authentication method | Supported connection methods | Minimum SKU |
63+
|---|---|---|
64+
| [Microsoft Entra ID (Preview)](bastion-entra-id-authentication.md) (Preview for RDP) | Azure portal, native client | Basic (portal), Standard (native client) |
65+
| Username and password | Azure portal, IP address (portal), native client | Basic (portal), Standard (IP address, native client) |
66+
| [Kerberos](kerberos-authentication-portal.md) | Azure portal | Basic |
5067

51-
* **AADLoginForWindows** extension should be enabled on the VM. Microsoft Entra ID Login can be enabled during VM creation by checking the box for **Login with Microsoft Entra ID** or by adding the **AADLogin** extension to a pre-existing VM.
68+
<a name="connect-to-a-vm"></a>
5269

53-
* One of the following required roles should be configured on the VM for the user:
70+
## Connect to a virtual machine using RDP
5471

55-
* **Virtual Machine Administrator Login**: This role is necessary if you want to sign in with administrator privileges.
56-
* **Virtual Machine User Login**: This role is necessary if you want to sign in with regular user privileges.
72+
Select a connection method to see the corresponding steps. After you navigate to the Bastion connection page, choose your [authentication method](#authentication-methods).
5773

58-
Use the following steps to authenticate using Microsoft Entra ID.
74+
# [Azure portal](#tab/portal)
5975

60-
1. To authenticate using Microsoft Entra ID, configure the following settings.
76+
<a name="rdp"></a>
6177

62-
| Setting | Description |
63-
|------------------------|-----------------------------------------------------------------------------|
64-
| **Connection Settings**| Only available for SKUs higher than the Basic SKU. |
65-
| **Protocol** | Select RDP. |
66-
| **Port** | Specify the port number. |
67-
| **Authentication type**| Select **Microsoft Entra ID (Preview)** from the dropdown. |
68-
69-
1. To work with the VM in a new browser tab, select **Open in new browser tab**.
78+
Use the Azure portal to create a browser-based RDP connection to your Windows virtual machine. This method connects directly through your browser. No native RDP client or additional software is required on your local computer. The [Basic SKU](bastion-sku-comparison.md) or higher is required, or the Standard SKU if you need custom ports.
7079

71-
1. Click **Connect** to connect to the VM.
7280

73-
Limitations
74-
* RDP + Entra ID authentication support in the portal cannot be used concurrently with graphical session recording.
81+
1. In the [Azure portal](https://portal.azure.com), select your virtual machine. On the left pane select **Connect**, then select **Bastion**.
7582

76-
### Ports
83+
1. In the **Connection settings** tab, select **RDP** as the protocol, and enter the port number if you changed it from the default of 3389.
7784

78-
To connect to the Windows VM, you must have the following ports open on your Windows VM:
85+
1. Select your authentication method. [Microsoft Entra ID (Preview)](bastion-entra-id-authentication.md) is recommended. For other options, see [Authentication methods](#authentication-methods).
7986

80-
* Inbound port: RDP (3389) ***or***
81-
* Inbound port: Custom value (you'll then need to specify this custom port when you connect to the VM via Azure Bastion)
87+
1. Select **Connect** to open the RDP connection to your virtual machine in a new browser tab.
8288

8389
> [!NOTE]
84-
> If you want to specify a custom port value, Azure Bastion must be configured using the Standard SKU or higher. The Basic SKU does not allow you to specify custom ports.
90+
> For troubleshooting tips, see [Troubleshooting RDP connections](troubleshoot.md) and [Troubleshoot Microsoft Entra sign in for a Windows virtual machine in Azure or Arc-enabled Windows Server](/entra/identity/devices/howto-vm-sign-in-azure-ad-windows#troubleshoot-sign-in-problems)
8591
86-
### Rights on target VM
8792

88-
[!INCLUDE [Remote Desktop Users](../../includes/bastion-remote-desktop-users.md)]
93+
# [IP address (portal)](#tab/ip-address)
8994

90-
See the [Azure Bastion FAQ](bastion-faq.md) for additional requirements.
95+
<a name="ip-address"></a>
96+
97+
Use the Azure portal to create a browser-based RDP connection to your Windows virtual machine using a specified IP address. This method connects through your browser and doesn't require a native RDP client or additional software on your local computer. The Standard SKU or higher is required, and you must enable [IP-based connection](connect-ip-address.md).
98+
99+
### Enable IP-based connection
100+
101+
Before you can connect using an IP address, you must enable IP-based connection on your Bastion deployment.
102+
103+
1. In the [Azure portal](https://portal.azure.com), go to your Bastion deployment.
104+
105+
1. On the **Configuration** page, for **Tier**, verify the SKU is set to the **Standard** SKU or higher. If the SKU is set to the Basic SKU, select a higher SKU from the dropdown.
106+
107+
1. Select **IP based connection**.
108+
109+
1. Select **Apply** to apply the changes. It takes a few minutes for the Bastion configuration to complete.
110+
111+
1. You specify the IP address of the target virtual machine directly on the Bastion **Connect** page, rather than selecting a virtual machine from the Azure portal.
112+
113+
### Connect using an IP address
114+
115+
1. To connect to a virtual machine using a specified IP address, make the connection from Bastion, not directly from the virtual machine page. On your Bastion resource, select **Connect** to open the Connect page.
116+
117+
1. On the Bastion **Connect** page, for **IP address**, enter the IP address of the target virtual machine.
118+
119+
:::image type="content" source="./media/connect-ip-address/ip-address.png" alt-text="Screenshot of the Connect using Azure Bastion page." lightbox="./media/connect-ip-address/ip-address.png":::
120+
121+
1. Adjust your connection settings to the desired **Protocol** (RDP) and **Port**.
122+
123+
1. Enter your credentials in **Username** and **Password**.
124+
125+
1. Select **Connect** to connect to your virtual machine.
126+
127+
For native client RDP connections via IP address, see the **Native client** tab on this page.
128+
129+
# [Native client](#tab/native-client)
130+
131+
Connect to your Windows virtual machine from a local Windows computer using Azure CLI (`az network bastion rdp`). This method requires the [Standard SKU](bastion-sku-comparison.md) or higher with [native client support configured](native-client.md).
132+
133+
:::image type="content" source="./media/native-client/native-client-architecture.png" alt-text="Diagram shows a connection via native client." lightbox="./media/native-client/native-client-architecture.png":::
134+
135+
[!INCLUDE [Native client RDP to Windows VM](../../includes/bastion-native-rdp-windows.md)]
136+
137+
For SSH and tunnel connections, see [Connect to a VM using Bastion and the Windows native client](connect-vm-native-client-windows.md).
138+
139+
---
140+
141+
## Limitations
91142

92-
## <a name="rdp"></a>Connect
143+
* **IP-based connections:** IP-based connection doesn't work with force tunneling over VPN, or when a default route is advertised over an ExpressRoute circuit. Azure Bastion requires access to the Internet and force tunneling, or the default route advertisement, results in traffic blackholing.
144+
* **IP-based connections:** UDR isn't supported on the Bastion subnet, including with IP-based connections.
145+
* **IP-based connections:** Custom ports and protocols aren't currently supported when connecting to a virtual machine via native client with IP-based connections.
146+
* **Microsoft Entra ID:** Microsoft Entra authentication isn't supported for IP-based RDP connections. IP-based SSH connections via native client do support Entra ID authentication. For Entra ID auth details, see [About Microsoft Entra ID authentication](bastion-entra-id-authentication.md).
147+
* **Session recording:** RDP + Entra ID authentication in the portal can't be used concurrently with [graphical session recording](session-recording.md).
93148

94-
[!INCLUDE [Connect to a Windows VM](../../includes/bastion-vm-rdp.md)]
95-
96149
## Next steps
97150

98-
Read the [Bastion FAQ](bastion-faq.md) for more connection information.
151+
* [Connect to a Windows VM using SSH](bastion-connect-vm-ssh-windows.md)
152+
* [What is Azure Bastion?](bastion-overview.md)
153+
* [Configure Microsoft Entra ID authentication](bastion-entra-id-authentication.md) for identity-based access.
154+
* [Configure Kerberos authentication](kerberos-authentication-portal.md) for domain-joined virtual machines.
155+
* [Transfer files](vm-upload-download-native.md) to your virtual machine using a native client.
156+
* [Configure a shareable link](shareable-link.md) for users without Azure portal access.
157+
* [Azure Bastion FAQ](bastion-faq.md)
47.3 KB
Loading
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Connect to a Windows VM using native RDP client
3+
description: Steps to connect to a Windows virtual machine using Azure Bastion with a native RDP client via Azure CLI.
4+
author: abell
5+
ms.service: azure-bastion
6+
ms.topic: include
7+
ms.date: 03/06/2026
8+
ms.author: abell
9+
---
10+
When a user connects to a Windows VM via RDP, they must have rights on the target VM. If the user isn't a local administrator, add the user to the Remote Desktop Users group on the target VM.
11+
12+
1. Sign in to your Azure account using `az login`. If you have more than one subscription, you can view them using `az account list` and select the subscription containing your Bastion resource using `az account set --subscription "<subscription ID>"`.
13+
14+
1. To connect via RDP, use the following example.
15+
16+
```azurecli
17+
az network bastion rdp --name "<BastionName>" --resource-group "<ResourceGroupName>" --target-resource-id "<VMResourceId>"
18+
```
19+
20+
1. After running the command, you're prompted to input your credentials. You can use either a local username and password, or your Microsoft Entra credentials. Once you sign in to your target VM, the native client on your computer opens up with your VM session via **MSTSC**.
21+
22+
> [!IMPORTANT]
23+
> Remote connection to VMs that are joined to Microsoft Entra ID is allowed only from Windows 10 or later PCs that are Microsoft Entra registered (starting with Windows 10 20H1), Microsoft Entra joined, or Microsoft Entra hybrid joined to the *same* directory as the VM.
24+
25+
#### Specify authentication method
26+
27+
Optionally, you can also specify the authentication method as part of the command.
28+
29+
* **Microsoft Entra authentication:** For Windows 10 version 20H2+, Windows 11 21H2+, and Windows Server 2022, use `--enable-mfa`. For more information, see [az network bastion rdp - optional parameters](/cli/azure/network/bastion?#az-network-bastion-rdp(bastion)-optional-parameters).
30+
31+
#### Specify a custom port
32+
33+
You can specify a custom port when you connect to a Windows VM via RDP.
34+
35+
One scenario where this could be especially useful would be connecting to a Windows VM via port 22. This is a potential workaround for the limitation with the *az network bastion ssh* command, which can't be used by a Windows native client to connect to a Windows VM.
36+
37+
To specify a custom port, include the field **--resource-port** in the sign-in command, as shown in the following example.
38+
39+
```azurecli
40+
az network bastion rdp --name "<BastionName>" --resource-group "<ResourceGroupName>" --target-resource-id "<VMResourceId>" --resource-port "22"
41+
```
42+
43+
#### RDP to a Windows VM IP address
44+
45+
You can also connect to a VM private IP address, instead of the resource ID. Microsoft Entra authentication, and custom ports and protocols aren't supported when using this type of connection. For more information about IP-based connections, see [Connect to a VM - IP address](../articles/bastion/connect-ip-address.md).
46+
47+
Using the `az network bastion` command, replace `--target-resource-id` with `--target-ip-address` and the specified IP address to connect to your VM.
48+
49+
```azurecli
50+
az network bastion rdp --name "<BastionName>" --resource-group "<ResourceGroupName>" --target-ip-address "<VMIPAddress>"
51+
```

0 commit comments

Comments
 (0)