Retrieving RDP files to leverage the new Remote Desktop client for connecting to Windows Virtual Desktop resources

Retrieving RDP files to leverage the new Remote Desktop client for connecting to Windows Virtual Desktop resources

If you are using Windows Virtual Desktop, there are two supported options for launching Windows Virtual Desktop resources:

  1. Using the new Remote Desktop Client (MSRDC)
  2. Using the Windows Virtual Desktop (HTML5) web client ( http://aka.ms/wvdweb)

Many customers that I work for use web portals that contain tiles to business applications, comparable to the Microsoft My Apps portal, that includes custom tiles to apps they use. To access Windows Virtual Desktop RemoteApps, a common question is whether or not they can be included as tiles on their web portals.

In my search to answer that question, I stumbled upon a tweet of Freek Berson.

I was very happy to learn that RDP files could simply be downloaded from the Windows Virtual Desktop web client! Straight after reading that tweet, I tried to download the RDP files from the web client. Unfortunately the feature to download them is removed from the web client’s interface. Most noteworthy I couldn’t find any documentation or comments on why that feature is removed.

At that point I decided to check out the network panel in the Microsoft Edge (Chromium) Developer Tools to monitor and inspect the requests to and responses from the Windows Virtual Desktop web client. So let’s take a look at those findings:

  1. First the webfeed is discovered during a query to https://rdweb.wvd.microsoft.com/api/feeddiscovery/webfeeddiscovery.aspx
  1. When querying the webfeed, it returns all the Windows Virtual Desktop resources, including RDP files!
  1. Looking further in the network panel, the content of the RDP files is actually being queried for and returned in the response!

I pasted the contents of the response into a .rdp file on a clean instance of Windows Sandbox. Unfortunately, I was unable to launch the RemoteApp.

The .rdpw file extension

If I quote the same tweet from Freek Berson again: “This allows you to leverage the local WVD client”. That made me think, Windows Virtual Desktop uses a new Remote Desktop Client (MSRDC) as opposed to the Microsoft Terminal Services Client (MSTRC) that I tried to launch the RemoteApp with.

So I installed the new Remote Desktop client into the sandbox. As I’m trying to achieve launching Windows Virtual Desktop resources without asking end-users to open the new Remote Desktop Client at all, I didn’t subscribe to the feed.

Next I decided to change the default app associations for the .rdp extension to point towards the new Remote Desktop client. When I was about to change the default app association, I found out that there is a .rdpw extension pointing towards the new Remote Desktop client already! Even better, the description matches my intentions too.

Therefore I simply rename the .rdp file to .rdpw and try to launch it again.

The very first time opening a RemoteApp from a .rdpw file, you are prompted to authenticate to Windows Virtual Desktop. The credentials you enter will be cached, this does not subscribe you to the feed in the Remote Desktop app, neither will RemoteApps you have access to be added to your start menu.

First authentication prompt

If you don’t have Single Sign On enabled (currently only available using ADFS), a second authentication prompt is shown, which is needed to authenticate to the session host.

NOTE: You can change the workspace id in the .rdpw file to a value of your liking, to display a friendly name when connecting to RemoteApps.

Second authentication prompt with a modified workspace id

As a result, after you have successfully authenticated, the RemoteApp is launched!

RemoteApp is launched!

Wrapping up

Now you’ve seen that it’s possible to retrieve the contents for the .rdpw files from the Windows Virtual Desktop HTML5 Web Client, using the developer tools in your web browser, and that you can leverage the new Remote Desktop Client to launch Windows Virtual Desktop RemoteApps from those files!

One thought on “Retrieving RDP files to leverage the new Remote Desktop client for connecting to Windows Virtual Desktop resources

Leave a Reply

Your email address will not be published.