p0 rdp
Overview
The p0 rdp command connects you to a Windows virtual machine via Remote Desktop Protocol (RDP) through Azure Bastion Host. It automatically requests and provisions RDP access via P0, then launches the Bastion RDP session with Entra ID (Azure AD) authentication.
Authentication against P0 and Azure
Access request against your RDP integration
Provisioning of time-limited RDP access
Connection through Azure Bastion Host
Use p0 rdp anytime you need to access a Windows VM—no need to manage credentials, open tickets, or configure Bastion manually.
p0 rdp is currently supported on Windows only. Entra ID authentication for RDP through Azure Bastion requires a Windows client machine.
Prerequisites
Windows operating system — the command exits with an error on other platforms.
Logged-in user
p0 login <org-slug>Azure CLI (
az) installed — the command shells out toaz network bastion rdp.RDP integration configured and installed in your P0 tenant.
Azure Bastion Host configured for the target VM in your Azure environment.
Valid Azure credentials — the CLI performs
az loginif you are not already authenticated.
Syntax
Positional arguments
destination
string
Yes
The name or identifier of the Windows VM you want to connect to.
Options
--reason <text>
string
—
Justification for the access request (for audit logs).
--configure
boolean
false
Configure the RDP session settings before connecting.
--debug
boolean
false
Print debug information during the connection process.
How it works
Verify platform: confirms you are running on Windows. Exits with an error on other operating systems.
Authenticate: logs you in to P0 via
p0 logincredentials.Validate integration: checks that your P0 tenant has an RDP integration installed. Exits if no integration is configured.
Request access: sends a permission request to the P0 backend for an RDP session to the specified destination. Waits for the request to be approved and provisioned.
Set up Azure: sets the active Azure CLI subscription and logs in to the correct Azure tenant if needed.
Connect: launches
az network bastion rdpwith Entra ID authentication (--auth-type aad) to establish the RDP session through Azure Bastion Host.
Examples
1. Connect to a Windows VM
Requests RDP access to
my-windows-vmwith an audit trail reason.Waits for approval and provisioning, then opens the RDP session.
2. Configure the RDP session before connecting
Opens the RDP session configuration dialog before connecting, allowing you to adjust display, local resource, and other session settings.
3. Debug the connection flow
Prints detailed information about API calls, Azure authentication, and the Bastion connection process.
Error conditions
"RDP session connections are only supported on Windows."
You are running the command on macOS or Linux. RDP via Azure Bastion with Entra ID authentication requires a Windows client.
"This organization is not configured for RDP access"
Your P0 tenant does not have an RDP integration installed. Contact your P0 administrator to configure the integration.
"Your access request was denied"
An approver denied your RDP access request. Check your request reason and try again, or contact the approver.
"Failed to create Azure Bastion RDP connection: <error details>"
The
az network bastion rdpcommand failed. Verify that:Azure CLI is installed and up to date.
You have network access to the Azure Bastion Host.
The target VM is running and reachable from the Bastion.
Azure authentication errors
If you see errors about subscriptions, tenants, or authorization, verify that:
You are logged in to the correct Azure tenant (
az login).Your Azure account has access to the subscription containing the target VM.
Last updated