I’ve configured quite a few Teams Media Optimization with Azure Virtual Desktop as per the following Microsoft documentation in the past:
Use Microsoft Teams on Azure Virtual Desktop
https://learn.microsoft.com/en-us/azure/virtual-desktop/teams-on-avd
The configuration isn’t difficult and I never had any issues until recently when I had to repeat the same for an environment I worked on. After performing all the steps, I noticed that the settings in Teams would either display:
Audio Devices: Custom Setup
Speaker: None
Microphone: None
Which means no devices are redirected or optimized:
Or:
Audio Devices: Custom Setup
Speaker: Remote Audio
Microphone: Remote Audio
Camera: Integrated Camera (Redirected)
Which means redirected audio and video devices were taking place but not optimization.
**Note that redirect works if these RDP settings are configured:
audiocapturemode:i:1 Enable audio capture from the local device and redirection to an audio application in the remote session
audiomode:i:0 Plays sound on the local computer
camerastoredirect:s:* Redirect cameras
After going through all the steps multiple times and not having any luck, I recalled a long time ago when I experienced an issue where if I had logged into Teams on an Azure Virtual Desktop BEFORE configuring Microsoft Teams Media Optimization, the optimization would fail. This generally wasn’t an issue for me as I always configure the optimization before rolling out the desktops but for this instance I had not so I went into the folder %appdata%MicrosoftTeams to delete all the items and long behold it corrected the issue.
I haven’t encountered this issue as much but this took up quite a bit of my time to troubleshoot so I hope others with this issue will find this post and be able to resolve it quicker.
The versions of the applications I used for this deployment are:
Microsoft Teams: 1.6.00.11166
Remote Desktop WebRTC Redirector Service: 1.33.2302.07001
Microsoft Remote Desktop: 1.2.4337.0 (x64)
Microsoft Visual C++ 2015-2022 Redistributable (x64): 14.36.32532.0