Citrix HDX Optimization Installing Microsoft Teams Per-User: Today there are 2 different ways of installing Microsoft Teams. You can install it either as a per-user install or a per-machine (machine-wide) install. Re: Options to set up MS Teams Desktop Client for Citrix Users I have little experience of this but I know Microsoft and Citrix are kinda friends now:) Here's a blog with a little information about Citrix and teams. Good news, the long-awaited new AV Redirection with media optimization (WebRTC) client for Microsoft Teams is now available in Generally Available – GA for the Windows Desktop on Windows 10 machines. You can now start testing the new software without being part of any private previews. This feature has been one that was long on the waiting list for customers and has now been released!
Average time to read:4minutes
Following command line installs Microsoft Teams: msiexec /i 'pathtomsi' ALLUSER=1. By setting ALLUSER=1 property MSI will install Teams to Program Files. Please note, that it is not ALLUSERS very well-known property, but Microsoft Teams custom created ALLUSER property without letter S. Citrix will also invest in building a Microsoft-centric Citrix Workspace, providing deep integrations to optimize performance, functionality, and micro-apps for Windows Virtual Desktop and Microsoft 365, including Microsoft Teams. In addition, Citrix will use Azure and Microsoft 365 across its operations to accelerate innovation and enhance.
How I tricked the HdxBrowserCef.exe (Chrome Browser) process into presenting itself as an Edge Browser enabling the best of both worlds.
This is a guest post, written by Dennis Smith.
We needed to be able to make a Microsoft Teams video call via our VDI. But since the Citrix HDX optimization for Microsoft Teams is still not released, my chances of getting it to work were slim to say the least. But I’m one of those people who won’t take ‘no’ for an answer.
The situation
Our organization uses, like many production environments do, the Citrix Virtual Workspace 7.15 LTSR CU3. We host a VDI and make the VM’s available via a Netscaler.
We thought, maybe we can get it to work usingthe browser (teams.microsoft.com) and Citrix ‘Browser Content Redirection 2.0’,using Fernando Klurfan’s guide here;
We had set up the environment and contentredirection with YouTube worked.
Under the hood
A close inspection on how this system really works was needed to find a solution to our problem. Just like flash redirection a few years ago, I know that the URL that has to be displayed is passed on via the ICA client, ahhum, sorry, I mean the Workspace App, of course.
On the client side, Citrix uses theHdxBrowserCef.exe to render the pages locally.
This immediately raised some questions, whatdoes CEF stand for?
After setting the necessary policies/reg keysto enable redirection, as shown below;
And installing the Chrome extension;
We were able to successfully run teams locally, and everything worked…
Except video calling.
No video calling using Chrome, no Browser redirection using Edge

It seems that browser video calling is notpossible using Chrome, I don’t know why, because technically it’s not an issue,at all. I know that Microsoft Teams in-browser video conferencing on Edgeworks. Must be a political thing. Apparently, on the server side Microsoftchecks what browser you’re using and only allows Edge browsers to do videoconferencing. However, the issue remains, Edge does not support browserredirection.
After some tests, I found that Chrome could befooled into presenting itself as if it was Edge by setting the User Agent to aEdge identifier. Using shift-control i,and select, network conditions, User agent;
Now if I could only fool the local browser inpresenting itself with a Edge user agent. The local browser is in this case isthe ‘HdxBrowserCef.exe’, it comes with the Citrix Workspace App (Receiver).
Further inspection on the HdxBrowserCef.exerevealed that it uses the open source lib called Chromium Embedded Framework(CEF). It does not use the local Google Chrome. Now we know what CEF stands forin HdxBrowserCef.exe.
The question is, is it possible for CEF tochange the user agent, and does CEF support webcam access? Free sketch app for mac.
Yes, it is, and here’s how!
Microsoft Teams Citrix Hdx
and;
(source https://ourcodeworld.com/articles/read/425/how-to-enable-webrtc-access-camera-and-microphone-for-cefsharp-in-winforms)
But to re-write the whole HdxBrowserCef.exe isa bridge too far, we only needed it to present itself as Edge.
I started searching for User Agent strings in the Citrix Workspace App folder that holds the HdxBrowserCef.exe. And found it in the ‘libcef.dll’. We dove into the file using a hex editor (https://hexed.it/), searched for ‘mozilla’, because that’s in all User Agent strings;
Changed this into;
Adding an Edge user string to the User Agentstring. Saved the .dll, and tested this using www.whatismybrowser.comto see if we successfully fooled the HdxBrowserCef.exe into presenting itselfas Edge. And it worked! Notice that strings are stored using &h00 as ‘endof string’, and &h20 as ‘space’.
The next test was, will in-browser Teams videocalling work?, the icon was there so it looked promising.
After a few video calls, I concluded thiswork-around works. Please keep in mind that using this setup every redirectedweb-page, including youtube, will be requested as Edge.
Dennis Smith – Gourami.eu
Disclaimer: this article is intended as atechnical proof of concept. We do not recommend doing this yourself.
Modern times require modern solutions such as Microsoft Teams. What to do however when your Microsoft Teams user experience is not up to par due to extensive consumption in your organization?
This blogpost will guide you through optimizing Teams on Citrix and your local machines.
Please keep in mind that below text is all based on the full Teams client, meaning this does not apply to the web version.
Install Microsoft Teams On Citrix Xenapp
From a Citrix/Microsoft environment perspective; there are two primary ways to optimize your Microsoft Teams traffic.
- Use Quality of Service (QoS) tagging for the ‘Teams’ packages that are transmitted over your network.
- Use HDX Redirection (optimization) for Microsoft Teams on Citrix to offload CPU consumption.
Quality of Service
Quality of Service works best if this is deployed through your whole organization. If you prioritize a Microsoft Teams package that is less important than ‘Business Application X’ you might experience unsatisfying behavior in your network priority. You can say something is important, but you would need to know how important it is in consideration to other things. Otherwise it would always be your top priority, at least for IT devices that is how it works.
Quality of Service needs to be supported (and honored) by your network devices and additional configuration might be required on these devices.
Let’s say that you already have QoS setup in your network environment. Then the default Microsoft recommendation would be to setup QoS tagging with the following ranges for Microsoft Teams:
This can be easily done with a GPO. Optionally you can configure the source/destination addresses.
Microsoft Teams optimization on Citrix
Microsoft Teams redirection is an efficient method for saving VDI/SBC resources. This however only works for the desktop based (a.k.a. fat-client) Microsoft Teams 1.2.00.31357 in combination with the Citrix Workspace client on the local user desktop. (minimum version 1907).
On the Worker
Microsoft Teams would need to be installed after the VDA Agent has been installed. If you already installed Microsoft Teams and did it in the wrong order, you can always reinstall Microsoft Teams. Depending on your setup (persistent vs non-persistent) you need to set up the installation differently.
As an example you’ll find the commands below. To be safe refer to the latest vendor documentation.
In short there are two available installation commands:

Per-User installation (default)
This won’t work properly on non-persistent setups. Also, the application will auto-update. This is better for dedicated persistent VM’s.
Install Microsoft Teams On Citrix Client
Per-Machine installation
This will work properly on Non-Persistent setups. Also the client won’t auto-update with this parameter (saves you the user tickets about update prompts).
Install Microsoft Teams On Citrix App
Checking the configuration
After being installed, the Microsoft Teams client needs to load in VDI mode, this is done via a policy that is set automatically by default.
No need to configure it unless you manually disabled it in the past.
You can confirm if the policy is enabled by checking if the following key is set to ‘1’.
HKEY_CURRENT_USERSoftwareCitrixHDXMediaStreamMSTeamsRedirSupport
On Microsoft Teams you can check if everything is working correctly by clicking on About > Version, and the Citrix HDX Optimized legend displays:

Editing the gpo
Now it is time to update the GPO you created earlier and add the QoS tagging for the Teams redirection client.
You need to add the MicrosoftTeamsCitrix entries. Depending on your current running version, the service might be named differently.
Currently we have:
- Teams.exe (local fat client)
- HDXTeams.exe (offload service before 2009.6)
- HdxRtcEngine.exe (offload service from 2009.6 and onward)
When all is said and done
Microsoft Teams should now offload Media traffic to your local machine’s HDXTeams.exe or HdxRtcEngine.exe service. saving a lot of those precious SBC/VDI resources and automatically redirects the local host peripherals (microphone, camera etc.) as a bonus.
Sources
- https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/multimedia/opt-ms-teams.html
- https://docs.microsoft.com/en-us/microsoftteams/qos-in-teams
