Is there a public API to download .rdpw files for AVD session hosts?

Sampath Samaraweera 0 Reputation points
2025-09-21T19:46:35.78+00:00

Hi all,

I’m working on building an RDP solution and want to integrate Azure Virtual Desktop (AVD) into it.

So far, I can query host pool and desktop details using the Microsoft Desktop Virtualization REST APIs: https://learn.microsoft.com/en-us/rest/api/desktopvirtualization

But I’ve hit a roadblock:

  • I can’t find any public API to download the.rdpw file for a session host.

Currently, the only way I can get it is by going through the web client at https://client.wvd.microsoft.com/arm/webclient/index.html and manually exporting/importing it. That doesn’t work for automation.

My questions:

Is there any publicly available API to download the .rdpw file for AVD?

If not, is the loadbalanceinfo attribute inside the .rdpw file documented anywhere? Example line from an .rdpw:What does the GUID-like string (fa43032-g432-fd54-543bb-fd34mdk8g) actually represent?

loadbalanceinfo:s:mth://localhost/fa43032-g432-fd54-543bb-fd34mdk8g/145f8y2e3-9or7-h32-4f3f-gfsl433lmv

Any insights, docs, or workarounds would be much appreciated.

Thanks! 

Azure Virtual Desktop
Azure Virtual Desktop

A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.


3 answers

Sort by: Most helpful
  1. George L. Yermulnik 0 Reputation points
    2026-08-04T10:47:22.3533333+00:00

    Given the recent change to availability of an option to download RDPW file, where do we download it from nowadays please?

    Was this answer helpful?

    0 comments No comments

  2. Himanshu Shekhar 6,795 Reputation points Microsoft External Staff Moderator
    2025-09-23T12:53:59.68+00:00

    Hello Sampath Samaraweera

    The .rdpw file, which is used for connecting to session hosts, is only possible by the AVD web client manually by exporting it from the web interface. This manual method is the only supported means for downloading the file, and no automation API.

    The .rdpw file must be downloaded manually from the AVD web client currently: https://client.wvd.microsoft.com/arm/webclient/index.html. The .rdpw file contains loadbalanceinfo which is a routing/load balancing token with a GUID.

    Microsoft Desktop Virtualization REST API overview and usage for querying host pools and desktops : https://learn.microsoft.com/en-us/rest/api/desktopvirtualization/

    RDP connection property documentation that may help with session customization:https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/remote-desktop-uri

    Was this answer helpful?

    0 comments No comments

  3. Divyesh Govaerdhanan 11,725 Reputation points MVP Volunteer Moderator
    2025-09-21T23:00:50.1733333+00:00

    Hello,

    Welcome to Microsoft Q&A,

    There’s no public, supported API to fetch an Azure Virtual Desktop “.rdpw” file. Microsoft doesn’t expose such an endpoint in the Desktop Virtualization REST API, and the documented automation path is to launch or subscribe the AVD client via URI schemes rather than distributing RDP/RDPW files.

    https://learn.microsoft.com/en-us/rest/api/desktopvirtualization

    To automate:

    • Use the AVD URI schemes (supported by the MS Remote Desktop client):
      • ms-avd:connect?... lets you launch a specific desktop or RemoteApp for a specific user by object IDs. Example parameters: workspaceId, resourceId, user, and optional env.
      • ms-rd:subscribe?url=https://rdweb.wvd.microsoft.com auto-subscribes the client to a Workspace (you can also point at the ARM feed discovery endpoint). Microsoft Learn

    These URIs are the Microsoft-blessed way to automate AVD client behavior instead of handling .rdpw files directly.

    loadbalanceinfo is an RDP load-balancing cookie parameter that clients can pass to brokers/gateways. Microsoft documents the setting generically (as part of RDP/ActiveX), but does not document AVD’s specific values. the GUID-like strings are routing/session identifiers consumed by the AVD broker/gateway—not stable resource IDs you should rely on. Community threads also show that the connection info inside .rdpw is ephemeral (e.g., cert/connection details expire), another reason Microsoft pushes URI-based launch instead of file distribution.

    Please Upvote and accept the answer if it helps!!

    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.