How to Use Terraform to Configure Feed Display with Preferred App Group Type Settings in Azure Virtual Desktop

In June 2024, Microsoft introduced a feature in Azure Virtual Desktop called Preferred App Group Type settings. This feature helps users streamline their feed display by showing only their preferred type of application group—either RemoteApp or Desktop—thus avoiding multiple simultaneous session connections and reducing connectivity issues. Also, it’s an enhancement that improves how resources are displayed in the feed for users assigned to both RemoteApp and Desktop applications.

A child using a computer

Description automatically generated

Here is how you can update the Preferred App Group Type

I will show you how to configure this setting using different methods:

1. Azure Portal

Navigate to the Azure Portal.

Go to your Azure Virtual Desktop host pool.

Select the preferred application group type from the drop-down menu.

2. PowerShell

Use the Update-AzWvdHostPool command to set the preferred app group type:

Update-AzWvdHostPool -ResourceGroupName “YourResourceGroupName” ` -HostPoolName “YourHostPoolName” ` -PreferredAppGroupType “RailApplications” # or “Desktop”

3. Azure REST API

Include the preferredAppGroupType parameter in your PUT request:

{

“properties”: {

“preferredAppGroupType”: “RailApplications” // or “Desktop”

}

}

Send this request to the appropriate endpoint for your host pool.

Benefits

  • Streamlined Experience: Users see only the applications relevant to them.
  • Reduced Connectivity Issues: Prevents multiple session connections, reducing potential issues.

For detailed instructions, please refer to the official Microsoft blog post.

If you are using Terraform to manage your AVD infrastructure, you may find it difficult to configure it, as the Microsoft blog has not explained how to set this with the Terraform Code. To do the same, I have created a Terraform Script which you can use in your deployment.

The code is stored in my public repository at the below GitHub URL.

https://github.com/aavisekc/avd_demo

A screenshot of a computer

Description automatically generated

To use these files once you clone the repos in your local:

  1. Save each code block into separate files (main.tf, variables.tf, terraform.tfvars).
  2. Initialize Terraform with terraform init.
  3. Run a Terraform Plan. A command can look like this (terraform plan -var-file=”terraform.tfvars”)
  4. Apply the configuration with terraform apply. A command can look like this (terraform apply -var-file=”terraform.tfvars”)

You can change the parameters in terraform.tfvars based on your requirements.

These scripts will create an Azure Resource Group and an Azure Virtual Desktop host pool with the preferred app group type setting configured. Adjust the values in terraform.tfvars as needed for your environment.

0.00 avg. rating (0% score) - 0 votes