Make Microsoft Teams work on Firefox on Linux

Microsoft Teams is annoyingly popular videoconferencing tool in enterprises, public events and all kinds of communities. Unfortunately the tool is not inteded to work on ethical software, such as Firefox running on Linux operating systems.

In the end of 2019 Microsoft announced availability of Teams client for Linux. Debian (.deb) and Red Hat (.rpm) flavors were available for download. But curious users were quick to notice Linux client did not receive functionality to match fat-client offered for Windows or even macOS.

Further on Linux client stopped receiving updates and on December, 2022 it was removed – download page started recommending web version of Microsoft Teams.

There is a problem, however – web version of Microsoft Teams is claiming it works only on proprietary Blink (part of Chromium project) engine based browsers:

For me neither is an option. Luckily, there is a solution that works as of now (December, 2023) – until Microsoft discovers and disables this workaround.

You could set Firefox to pretend it is Chromium-based browser, but there may be Firefox-specific code in Teams codebase that indeed has something it really needs to be able to support Firefox (even non-officially).

Web version of Microsoft Teams indeed works smooth on Firefox that is running on macOS out-of-the-box.

Since browser detection always relies on User-Agent header, this gave me idea to try something easy and straightforward – first let's see what User Agent Firefox is exposing on macOS by default:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:120.0) Gecko/20100101 Firefox/120.0

Pay no attention to Intel Mac OS X – it shows exactly the same on Apple silicon (arm64) devices.

Now here is what my Linux box is reporting when using Firefox on it:

Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0

So I went to Firefox settings at about:config and created string type parameter general.useragent.override with following value (yes, the same you've seen on macOS):

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:120.0) Gecko/20100101 Firefox/120.0

You may need to increase revision (rv:) and Firefox/120.0 version numbers as they go up, but for now it works. Until Microsoft decides to make our lives worse and disables this workaround.


My name is Gytis Repečka, I am Solution Architect and data professional. I enjoy using, promoting and contributing to open source software and love communicating about tech to both advanced and non-tech people. Visit Inretio for consulting services. Comment by mentioning me @gytisrepecka@social.gyt.is on Fediverse.