How to configure the URI Scheme for AVD

If you’re utilizing Azure Virtual Desktop (AVD), you’re likely aware that subscribing to a workspace via the AVD client is necessary to access published remote applications and/or desktop.

However, now you have the capability to utilize Uniform Resource Identifier (URI) schemes with the client. This allows you to provide direct “links” to launch specified AVD resources without the prerequisite of subscribing to the workspace beforehand.

Picture: AI Generated Picture of a Server Room

Uniform Resource Identifier (URI) schemes offer a way to trigger the Remote Desktop client with tailored commands, parameters, and values, specifically designed for use with Azure Virtual Desktop. This enables actions such as subscribing to a workspace or connecting to a specific desktop or RemoteApp directly.

Client Version
Remote Desktop client for Windows 1.2.4065 and later

Types of URI schemes

There are two URI schemes supported for Remote Desktop clients: ms-avd and ms-rd. With ms-avd, you can specify a particular Azure Virtual Desktop resource and user for connection. With ms-rd, you can automatically subscribe to a workspace in the Remote Desktop client, thus eliminating the need for manual addition of the workspace.

ms-avd

The ms-avd Uniform Resource Identifier (URI) scheme for Azure Virtual Desktop is now generally available. Below is a list of currently supported commands for ms-avd along with their corresponding parameters.

ms-avd:connect

ms-avd:connect locates a specified Azure Virtual Desktop resource and initiates the RDP session, directly connecting a specified user to that resource.

Let’s see what is written in MS Documentation about this.

Command name: connect

Parameter Values Description
workspaceid Object ID (GUID). Specify the object ID of a valid workspace.

To get the object ID value using PowerShell, see Retrieve the object ID of a host pool, workspace, application group, or application. You can also use Desktop Virtualization REST APIs.

resourceid Object ID (GUID). Specify the object ID of a published resource contained in the workspace. The value can be for a desktop or RemoteApp.

To get the object ID value using PowerShell, see Retrieve the object ID of a host pool, workspace, application group, or application. You can also use Desktop Virtualization REST APIs.

user User Principal Name (UPN), for example [email protected]. Specify a valid user with access to specified resource.
env (optional) avdarm (commercial Azure)
avdgov (Azure Government)
Specify the Azure cloud where resources are located.
version 0 Specify the version of the connect URI scheme to use.
launchpartnerid (optional) GUID. Specify the partner or customer-provided ID that you can use with Azure Virtual Desktop Diagnostics to help with troubleshooting. We recommend using a GUID, which you can generate with the New-Guid PowerShell cmdlet.
peeractivityid (optional) GUID. Specify the partner or customer-provided ID that you can use with Azure Virtual Desktop Diagnostics to help with troubleshooting. We recommend using a GUID, which you can generate with the New-Guid PowerShell cmdlet.

Here is the command example given by the Microsoft Team.

ms-avd:connect?workspaceId=1638e073-63b2-46d8-bd84-ea02ea905467&resourceid=c2f5facc-196f-46af-991e-a90f3252c185&[email protected]&version=0

You can run this command as shown below.

Command prompt: “<install path of AVD client>\msrdcw.exe” “ms-avd:connect?workspaceId=<workspace ID >&resourceid=<resource ID>&username=<user UPN>&version=0”

PowerShell: “<install path of AVD client>\msrdcw.exe” ‘ms-avd:connect?workspaceId=<workspace ID>&resourceid=<resource ID>&username=<user UPN>&version=0’

ms-rd

Here’s the list of currently supported commands for ms-rd and their corresponding parameters.

ms-rd:subscribe

ms-rd:subscribe launches the Remote Desktop client and starts the subscription process.

Command name: subscribe

An example command for ms-rd is shown below.

ms-rd:subscribe?url=https://rdweb.wvd.microsoft.com

That’s all for today. Hope you have a great day ahead. Please connect with me if you face any problems in configuring this in your lab.

Tags: