Optimization for Microsoft Teams

Note: This feature depends on a future Microsoft Teams release. We will update this description as information about the version and release date become available.

Citrix delivers optimization for desktop-based Microsoft Teams using Citrix Virtual Apps and Desktops and Citrix Workspace app. By default, we bundle all the necessary components into Citrix Workspace app and the Virtual Delivery Agent (VDA).

Our optimization for Microsoft Teams contains VDA-side HDX services and API to interface with the Teams hosted app to receive commands. These components open a control virtual channel to the Citrix Workspace app-side media engine. The endpoint decodes and renders the multimedia locally. Reverse seamless snaps-in the local Citrix Workspace app window back into the hosted Teams app.

Authentication and signaling occurs natively on the Teams-hosted app, just like the other Teams services (for example chat or collaboration). Audio/video redirection doesn’t affect them.

Only Client-fetch/client-render is available.


How optimization for Microsoft Teams works

This video demo gives you an idea of how Microsoft Teams works in a Citrix virtual environment.

Optimization for Microsoft Teams demo

System requirements

Minimum version - Virtual Delivery Agents (VDAs) 1906 for Windows Desktop OS:

Supported operating systems:

  • Windows 10 64-bit, minimum versions 1607 up to 1903.


  • Microsoft .NET Framework 4.7.1 or later is installed automatically if it is not already installed.
  • Microsoft Visual C++ 2013 and 2015 Runtimes, 32-bit and 64-bit.
  • BCR_x64.msi - the MSI that contains the Teams optimization code and starts automatically from the GUI. If you’re using the command line interface for the VDA installation, don’t exclude it.

Minimum version - Virtual Delivery Agent (VDA) 1906 for Server OS:

Supported operating systems:

  • Windows Server 2019, 2016, and 2012 R2 (Standard and Datacenter Editions).

The installer automatically installs the following items, which are available on the Citrix installation media in the Support folders:

  • Microsoft .NET Framework 4.7.1 or later is installed automatically if it is not already installed.
  • Microsoft Visual C++ 2013 and 2015 Runtimes, 32-bit and 64-bit.
  • BCR_x64.msi - the MSI that contains the Teams optimization code and starts automatically from the GUI. If you’re using the command line interface for the VDA installation, don’t exclude it.

If you didn’t install and enable the Remote Desktop Services roles, the installer automatically installs and enables those roles.

Minimum version - Citrix Workspace app 1905 for Windows:

  • Windows 7, 8, and 10 (32-bit and 64-bit editions, including Embedded editions)
  • Endpoint requirement: Approximately 1.8 - 2.0 GHz quad-core CPU that can support 360p VGA resolution during a peer-to-peer video conference call.
  • Citrix Workspace app requires a minimum of 600 MB free disk space and 1 GB RAM.
  • Microsoft .NET Framework minimum requirement is version 4.6.2. Citrix Workspace app automatically downloads and installs .NET Framework if it is not present in the system.
  • This version of Citrix Workspace app supports Audio and Video redirection (peer-to-peer or conference) and incoming screensharing. Outgoing screensharing is not supported.

Enable optimization of Microsoft Teams

To enable optimization for Microsoft Teams, use the Studio policy described in Microsoft Teams redirection policy. In addition to this policy being enabled, HDX checks to verify that the version of Citrix Workspace app is equal to or greater than the minimum required version. If the policy is enabled and the version of Citrix Workspace app is supported, the HKEY_CURRENT_USER\Software\Citrix\HDXMediaStream\MSTeamsRedirSupport registry key is set to 1 automatically. The Microsoft Teams application reads the key to load in VDI mode.

Peripherals in Microsoft Teams

When optimization for Microsoft Teams is active, Citrix Workspace app accesses the peripherals (headset, microphone, cameras, speakers, and so forth). Then the peripherals are properly enumerated in the Microsoft Teams UI (Settings > Devices).

Optimization mode for Microsoft Teams

Microsoft Teams does not access the devices directly. Instead, it relies on HdxTeams.exe for acquiring, capturing, and processing the media. Microsoft Teams lists the devices for the user to select.

The HDX technologies can use either of these methods for mapping peripherals:

  • Optimization for Microsoft Teams (recommended mode).
  • If Microsoft Teams fails to load in optimized VDI mode, the VDA uses legacy HDX technologies like Webcam redirection and client Audio and Microphone redirection. In the unoptimized mode, the peripherals are mapped to the VDA. The peripherals appear to the Microsoft Teams app as if they were locally attached to the virtual desktop.

    The most significant difference is the camera name. If Microsoft Teams loaded in unoptimized mode, legacy HDX technologies launch and the webcam name has the Citrix HDX suffix as shown in the following graphic. The speaker and microphone device names might be slightly different when compared to the optimized mode.

Unoptimization mode for Microsoft Teams

When legacy HDX technologies are used, Microsoft Teams doesn’t offload audio, video, and screen sharing processing to the endpoint’s Citrix Workspace App WebRTC media engine. Instead, HDX technologies use server-side rendering. Expect high CPU consumption on the VDA when you turn on video. Real time audio performance might not be optimal.


This section provides troubleshooting tips for issues that you might encounter when using optimization for Microsoft Teams. Further information can be found in CTX253754.

On the Virtual Delivery Agent

There are four services installed by BCR_x64.msi. Only two are responsible for Microsoft Teams redirection in the VDA.

Four services installed by browser content redirection

  • Citrix HDX Teams Redirection Service establishes the virtual channel used in Teams. The service relies on CtxSvcHost.exe.

  • Citrix HDX HTML5 Video Redirection Service runs as WebSocketService.exe listening on TCP. WebSocketService.exe performs two main functions:

    i. TLS termination for secure WebSockets receives a secure WebSocket connection from vdiCitrixPeerConnection.js, which is a component inside the Teams app. You can track it with the Process Monitor, for example. For more information about certificates, see the section “TLS and HTML5 video redirection, and browser content redirection” under Communication between Controller and VDA.

    Process Monitor

    ii. User session mapping. When the Teams application starts, WebSocketService.exe starts the WebSocketAgent.exe process in the user’s session in the VDA. WebSocketService.exe runs in Session 0 as a LocalSystem account.

    WebSocketService.exe service

    You can use netstat to check if the WebSocketService.exe service is in an active listening state in the VDA.

    Run netstat -anob -p tcp from an elevated command prompt window:

    Using netstat to check on WebSocketService.exe service

    On a successful connection, the state changes to ESTABLISHED:

    Successful netstat to check on WebSocketService.exe service


WebSocketService.exe listens in two TCP sockets, and Port 9001 is used for browser content redirection and HTML5 video redirection. Port 9002 is used for Teams redirection.

Services locations and descriptions

Service Path to executable Log on as Description
Citrix HTML5 Video Redirection Service “C:\Program Files (x86)\Citrix\System32\WebSocketService.exe” /service Local System account Provides multiple HDX Multimedia services with the initial framework required to perform media redirection between the virtual desktop and the endpoint device.
Citrix HDX Browser Redirection Service “C:\Program Files (x86)\Citrix\System32\CtxSvcHost.exe” -g BrowserRedirSvcs This account (local service) Provides browser content redirection between the endpoint device and the virtual desktop.
Citrix Port Forwarding Service “C:\Program Files (x86)\Citrix\System32\CtxSvcHost.exe” -g PortFwdSvcs This account (local service) Provides port forwarding between the endpoint device and the virtual desktop for browser content redirection.
Citrix HDX Teams Redirection Service “C:\Program Files (x86)\Citrix\System32\CtxSvcHost.exe” -g TeamsSvcs Local System account Provides Microsoft Teams redirection between the endpoint device and the virtual desktop.

Citrix Workspace app

On the user’s endpoint, Citrix Workspace app for Windows instantiates a new service called HdxTeams.exe when Teams launches in the VDA and the user tries to make a call or access his peripherals in self-preview. If you don’t see this service, check the following:

  1. Ensure that you installed as a minimum the Workspace App version 1905 for Windows. Do you see HdxTeams.exe and the webrpc.dll binaries in the Workspace app installation path?
  2. If you validated step1, do the following to check if HdxTeams.exe is getting launched.
    1. Exit Teams on the VDA.
    2. Start services.msc on VDA.
    3. Stop the Citrix HDX Teams Redirection Service.
    4. Disconnect the ICA session.
    5. Connect the ICA session.
    6. Start the Citrix HDX Teams Redirection Service.
    7. Restart the Citrix HDX HTML5 Video Redirection Service.
    8. Launch Teams on the VDA.
  3. If you still don’t see HdxTeams.exe being launched on the client endpoint, do the following:
    1. Restart the VDA.
    2. Restart the client endpoint.


Citrix and Microsoft jointly support the delivery of Microsoft Teams from Citrix Virtual Apps and Desktops using optimization for Microsoft Teams. This joint support is the result of close collaboration between the two companies. If you have valid support contracts and you experience an issue with this solution, open a support ticket with the vendor whose code you suspect to be causing the issue. That is, Microsoft for Teams or Citrix for the optimization components.

Citrix or Microsoft receives the ticket, triages the issue, and escalates as appropriate. There is no need for you to contact each company’s support team.

Collecting logs

HDXTeams.exe logs can be found on the user’s machine at %TEMP% (AppData/Local/Temp). Look for a .txt called webrpc_Day_Month_timestamp_Year.txt

In the HdxTeams.exe logs, these are the relevant ICE (Interactive Connectivity Establishment) entries that should be there for a call set-up to succeed (see sample snippet below):

RPCStubs Info: -> device id = \\?\display#int3470#4&1835d135&0&uid13424#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bf89b5a5-61f7-4127-a279-e187013d7caf} label = Microsoft Camera Front groupId =

RTCPeerConnection::createOffer. audio = 1 video = 1
RTCPeerConnection::OnSignalingChange. signaling state = HaveLocalOffer
RTCPeerConnection::OnIceGatheringChange. state = Gathering

candidate:840548147 1 udp 2122194687 56927 typ host generation 0 ufrag oVk6 network-id 1
candidate:4271145120 1 udp 1685987071 55839 typ srflx raddr rport 55839 generation 0 ufrag uAVH network-id 1

RTCPeerConnection::OnIceGatheringChange. state = Complete

RTCPeerConnection::OnSignalingChange. signaling state = HaveRemoteOffer

If you encounter an issue and can reproduce it consistently, we recommend capturing CDF traces before contacting Support. For more information, see Knowledge Center article CDFcontrol.

For recommendations for collecting CDF traces, see the Knowledge Center article Recommendations for Collecting the CDF Traces.

Note: This issues might require remote CDF tracing. For example, if the registry key MSTeamsRedirSupport is not set to 1, a remote CDF trace is required because that key value is set on connect/reconnect to a session. For more information about remote CDF tracing, see Knowledge Center article CTX237216.

VDA side CDF traces - Enable the following CDF trace providers:

VDA side CDF traces

Workspace App side CDF traces - Enable the following CDF trace providers:

Workspace App side CDF traces