Introducing a new way to review your PRs.

Read the announcement

ismaelmartinez / teams-for-linux

Unofficial Microsoft Teams for Linux client

View on GitHub

23 documents · Updated Nov 23, 2026

docs / enterprise-device-management

Enterprise and device management

Enterprise and device management support connects the desktop client to managed identity services and desktop policy surfaces. It lets an Intune-enrolled Linux device use Microsoft Identity Broker for sign-in, lets administrators provide shared defaults, and keeps sandboxed background behavior visible without changing the rules of native installs.

This page is part of configuration and customization. For the wider settings load and migration flow, see configuration lifecycle; for user-facing settings that can change the desktop experience, see custom user experience.

Managed configuration

Managed configuration gives an administrator a shared baseline while preserving a user's local settings where needed. The app reads etc/…/config.json first, then merges the user's configuration from the application data directory over it, so an enterprise deployment can set defaults without making every setting immutable. app/…/index.js• L14-20, app/…/index.js• L38-91

The configuration system validates the merged file and reports key and type problems without stopping the app. This makes a bad enterprise setting visible in logs while allowing the remaining defaults and valid settings to load. See the configuration lifecycle page for the wider load, validation, and migration model.

References: app/…/index.js• L38-91 app/…/index.js• L184-200

Intune single sign-on

Intune single sign-on (SSO) uses the Microsoft Identity Broker already present on a managed Linux device. When auth.intune.enabled is on, the client selects a broker account and adds a broker-issued SSO credential only to Microsoft login requests. app/…/index.js• L675-687, app/…/index.js• L1268-1277

The broker must be installed, running, and able to expose at least one enrolled account with a usable Primary Refresh Token (PRT). An administrator can set auth.intune.user to select an account by email. If it is empty, the client uses the first account returned by the broker. An account name match is case-insensitive.

The SSO flow follows this path:

flowchart LR
    A[Managed Linux device] --> B[Microsoft Identity Broker]
    B --> C[Available Intune accounts]
    C --> D[Selected account]
    D --> E[Microsoft login request]
    E --> F[Teams session]

The broker interface has changed across releases. The client avoids broker introspection and accepts both older direct cookie data and newer cookie-item data. This allows enterprise deployments to update the broker without requiring a matching client release, although the broker interface remains an external dependency. app/…/index.js• L13-39, app/…/index.js• L42-63, docs-site/…/012-intune-sso-broker-compatibility.md• L19-26

Intune SSO is a single-account mode. If the multi-account switcher is also enabled at startup, the app records a warning and disables the switcher for that run because concurrent broker enrollments for different users are not a supported contract. This is separate from stored profile data, which can remain on disk for later use. app/index.js• L96-107, app/…/options.js• L1077-1092, app/…/storagePartitions.js• L1-16

References: app/…/index.js• L65-119 app/…/index.js• L180-209 app/…/index.js• L240-310 app/…/index.js• L675-687 app/…/index.js• L1268-1277 app/…/index.js• L1404-1412 app/index.js• L96-107 docs-site/…/intune-sso.md• L5-55

Flatpak background support

The background portal integration helps a Flatpak build keep notifications and ringing calls available when its window is closed. On Linux inside a Flatpak sandbox, startup asks the desktop portal for background permission and, when the user grants it, reports Running in background on portal version 2 or newer. app/index.js• L696-700, app/…/index.js• L46-91

This integration does not add the app to GNOME's Background Apps list. GNOME already lists windowless Flatpak apps through its portal monitor. It also does not apply to native, deb, AppImage, or snap packages because the integration is gated by the Flatpak runtime marker. app/…/index.js• L16-23

Background permission and autostart share one portal request. To avoid changing a user's launch choice, the client sends the current autostart state explicitly. A missing entry means autostart is off. A disabled entry also counts as off, so the portal does not silently turn it back on. The client does not create its own autostart feature. app/…/index.js• L124-169, app/…/index.js• L177-184

The request is asynchronous and non-blocking. A dismissed request, an unavailable portal, or a failed status update becomes a diagnostic log rather than a startup failure. If the user forbids background execution, portal policy can terminate the app while it has no window; the client cannot override that decision. app/…/index.js• L46-50, app/…/index.js• L212-275

References: app/…/index.js• L1-23 app/…/index.js• L46-91 app/…/index.js• L124-184 app/…/index.js• L212-275 app/…/README.md• L6-42 tests/…/backgroundPortal.test.js• L131-251

Enterprise network and device identity

Managed environments can require device certificates or a private certificate authority before Teams can connect. The client supports a user-approved CA fingerprint allowlist for untrusted authorities and can show a Linux PIN prompt for smartcard-backed client certificates. These controls extend trust for a known enterprise setup; they do not turn off normal certificate checks for unrelated errors. app/…/index.js• L1-35, app/…/index.js• L47-65

The smartcard PIN flow is opt-in on Linux and uses the operating system's native certificate request path on macOS and Windows. The PIN is held only for the request. The client limits submitted attempts per token during a session and rejects the request after cancellation or the limit. app/…/index.js• L3-25, app/…/index.js• L31-40, app/…/index.js• L47-91

These features affect deployment readiness rather than account selection. An enterprise image must provide the broker, certificate or smartcard setup, and any proxy settings required by the network. The app applies the configured proxy before the web session starts. app/…/commandLine.js• L27-56

References: app/…/index.js• L13-35 app/…/index.js• L47-65 app/…/index.js• L71-145 app/…/index.js• L47-91 app/index.js• L684-700 app/…/commandLine.js• L27-56 docs-site/…/configuration.md• L450-461

Deployment boundaries

Enterprise controls are enabled by configuration and by services supplied outside the app. The app can choose an Intune account, request a portal permission, and apply an explicit certificate trust decision. It cannot enroll a device, repair a missing Identity Broker, grant a denied portal permission, or replace a corporate smartcard setup.

The main operational split is:

AreaClient responsibilityExternal responsibility
Intune SSOSelect the broker account and attach the broker credential to Microsoft login requestsInstall and run Microsoft Identity Broker; enroll the account and maintain its PRT
Background executionRequest permission and report status in FlatpakDecide portal policy and whether the app may run without a window
Certificate trustApply configured CA fingerprints and collect a smartcard PIN when enabledProvide the CA, NSS/PKCS#11 setup, token, and valid certificates
Shared configurationMerge and validate system and user settingsPlace and maintain the system configuration

References: app/…/index.js• L38-91 app/…/index.js• L131-197 app/…/index.js• L53-91 app/…/index.js• L71-145 app/…/index.js• L47-91

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep auth.intune.* configuration names aligned with broker startup, request filtering, and the generated configuration documentation. The old flat names are removed rather than accepted as a permanent alias.
  • Preserve the Intune and multi-account startup mutex unless the broker supports concurrent account enrollments and the profile session model is updated together.
  • Keep the background portal gate tied to Flatpak. A host install must not receive portal calls that its desktop environment does not support.
  • Send the background request's explicit autostart state whenever portal behavior changes. Omitting it can remove a user's autostart entry.
  • Install certificate and smartcard handlers before the first web session handshake. New profile sessions must also receive certificate verification behavior.
  • Treat Identity Broker response shape and D-Bus availability as external contracts. Failure must fall back to normal sign-in or a clear diagnostic instead of blocking application startup.

Important failure modes

TriggerConsequenceGuard
Identity Broker is missing or not readyIntune SSO cannot select an account or obtain a broker credentialBroker readiness retries and logs a setup suggestion; normal web sign-in remains available
Configured Intune user is not enrolled in the brokerNo account is selected for SSOMatch the configured email case-insensitively and log the available-account failure
Intune and multi-account are enabled togetherMulti-account is disabled for the sessionStartup warning and config.warnings entry
User forbids Flatpak background executionPortal may terminate the app while it has no windowRequest the permission once and treat the portal decision as authoritative
Background request omits current autostart statePortal can remove the user's autostart entryAlways send the explicit boolean state
CA fingerprint is stale or not allowlistedEnterprise TLS connections remain rejectedUse a current validated-chain fingerprint and keep Chromium verification for other errors
Smartcard PIN is cancelled or exceeds the session capThe client certificate request stopsReject the certificate request without burning another card retry

Key files

FileWhy to read it
app/…/index.jsShows how system-wide and user configuration are loaded and merged.
app/…/options.jsDefines the Intune, multi-account, and client-certificate settings and their defaults.
app/…/index.jsDescribes the broker account and Microsoft login SSO boundary.
app/…/index.jsShows where Intune SSO is initialized and attached to web requests.
app/…/index.jsDefines Flatpak background permission, status, and autostart behavior.
app/…/index.jsExplains the enterprise CA trust boundary.
app/…/index.jsExplains Linux smartcard PIN handling and its safety limit.
app/index.jsShows startup ordering and the Intune/multi-account exclusion.
docs-site/…/intune-sso.mdProvides deployment prerequisites and user-facing Intune diagnostics.