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:
- Using the new Remote Desktop Client (MSRDC)
- 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.
#WVD Preview Tip: The RD Web page (https://t.co/NPnKWqQHfR) allows access to RemoteApps & Desktops using #HTML5. Did you know it also has the option “download the rdp file”? This allows you to leveradge the local WVD client! pic.twitter.com/EFpVehqYzt— Freek Berson (@fberson) June 19, 2019
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:
- First the webfeed is discovered during a query to https://rdweb.wvd.microsoft.com/api/feeddiscovery/webfeeddiscovery.aspx
- When querying the webfeed, it returns all the Windows Virtual Desktop resources, including RDP files!
- 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.
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.
As a result, after you have successfully authenticated, the RemoteApp is launched!
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”
1) Where is a default rdpw file is located?
2) Which address should we point to to WVD ?