Configuration and user customization
Configuration gives the desktop app one shared set of defaults and user choices. It controls startup behavior, runtime features, visual changes, and links to enterprise services without changing the Teams service itself.
Configuration model
The configuration model joins built-in defaults with settings from the command line, environment, and JSON files. A single option definition describes the value shape, default, help text, rename state, and when the app applies a change.
Configuration sources
The app can receive settings from a system file, a user file, or command-line and environment input. The system file at etc/…/config.json provides a machine-level base. The user config.json is then merged over it, so a user can replace a setting without copying the full enterprise baseline. Command-line and environment values are parsed with the same option model and can take part in startup selection.
The source order gives administrators a shared starting point while preserving user choice. A user file that cannot be read does not stop startup; the app falls back to the system file or built-in defaults and records the error for diagnosis.
References: app/…/index.js• L14-20 app/…/index.js• L38-91 app/…/index.js• L94-105
Option definitions
app/…/options.js is the source of truth for the configuration contract. The contract groups related settings into names such as app, window, appearance, auth, media, and network, while the generated reference exposes the supported types, defaults, nested fields, choices, and apply mode.
The option model separates settings that are safe to read again while the app runs from settings that shape startup. Most changes need a restart. A small set of menu-facing values can update live and is sent to the renderer as a change set.
See the configuration lifecycle page for the full path from defaults to applied settings.
References: app/…/options.js• L1-24 app/…/options.js• L30-66 docs-site/…/configuration-generated.md• L1-7 app/…/index.js• L515-525
Configuration lifecycle
At startup, the app loads and merges its sources, parses the result, applies compatibility rules, and then gives the resolved settings to the desktop shell and browser views. This ordering lets older files continue to work while new code uses one resolved configuration shape.
The following diagram shows the high-level configuration path.
flowchart LR
D[Built-in defaults] --> P[Parse settings]
S[System config] --> M[Merge sources]
U[User config] --> M
C[CLI and environment] --> P
M --> P
P --> R[Apply renamed options]
R --> V[Warn about invalid values]
V --> A[Apply to shell and Teams views]
Validation and diagnostics
Validation checks the config file against the option definitions. It reports unknown keys, wrong types, and values outside declared choices. The check is warn-only, so a bad entry does not block the app. Warning text names the option and expected type or choices, but does not print configured values that may contain URLs, tokens, or account names.
The app starts logging before it emits these checks. This keeps configuration problems available in the normal diagnostic path while protecting sensitive setting values.
References: app/…/validator.js• L1-6 app/…/validator.js• L48-78 app/…/validator.js• L112-139 app/…/index.js• L174-195
Renamed options
The configuration contract is moving from older flat names to nested names. Both forms work during the transition. When both forms are present, the nested name is the canonical choice and wins. The runtime maps the nested value to the key still consumed by feature code, which keeps the transition separate from feature behavior.
The migration action creates config.migrated.json beside the user file. It does not overwrite config.json, and it reads only the user file rather than copying system settings into a user-owned file. This lets the user review the result before adopting it.
The configuration lifecycle page covers rename rules, migration limits, and apply timing in more detail.
References: app/…/renames.js• L1-18 app/…/renames.js• L139-164 app/…/migrateFile.js• L27-37 app/…/migrateFile.js• L55-109 app/…/index.js• L371-451
User customizations
User customizations extend the wrapper around Teams. They can change how the desktop shell looks and behaves, add local content, or adapt the app to a user's operating system and meeting hardware.
Visual customization
The appearance settings support packaged themes, a user CSS file, and a system theme preference. The app applies CSS when the main Teams page and its embedded frames load. The system-theme setting drives the Teams user theme from operating-system theme events rather than asking the Teams web app for a host theme value.
Custom backgrounds provide a separate visual extension for meetings. When enabled, the app obtains a background list from the configured service and routes background image requests to that service. The feature keeps a local copy of the fetched list so the meeting UI has a usable result after a fetch failure.
See custom user experience for the user-facing customization features and their boundaries.
References: app/…/README.md• L1-18 app/…/index.js• L4-28 app/…/theme.js• L3-26 app/…/index.js• L12-55 app/…/index.js• L148-183
Behavioral customization
Behavior settings adapt the wrapper to local work habits and platform limits. They cover areas such as window and tray behavior, notifications, shortcuts, idle presence, media handling, URL entry, storage, and performance. Each feature reads the resolved configuration and changes only the wrapper behavior it owns.
Optional custom stickers add a local content path to the Teams chat composer. The app scans a configured folder when the panel opens, accepts a bounded set of image types, and inserts a selected image into the current compose box. URL import is off the main path and is constrained by HTTPS, content type, size, and a fetch timeout.
These settings are independent of Teams account settings. A wrapper change can alter the desktop surface or the way input reaches Teams, but it does not become a Teams tenant policy.
References: docs-site/…/configuration.md• L125-213 docs-site/…/configuration.md• L531-604 app/…/README.md• L1-5 app/…/README.md• L31-43
Live customization
Some menu actions change settings during the current session. The main process updates its resolved values and sends the small set of live changes to the renderer. Startup-only settings remain unchanged until the next launch, even when the config file is edited.
The distinction matters for support work: a saved setting can be correct while the current window still shows the old behavior. The generated configuration reference marks each option as live or restart.
References: app/…/options.js• L9-15 app/…/index.js• L515-545 app/…/preload.js• L479-484 docs-site/…/configuration-generated.md• L7-12
Enterprise integration
Enterprise use combines a machine-level configuration baseline with optional managed sign-in. The baseline can set common startup and behavior choices for all users. Intune integration can obtain Microsoft identity data for single sign-on when the host has the required broker service.
System-wide settings
The system config file is merged before the user file. This supports shared defaults without turning every machine choice into an unchangeable policy. The app treats a user file as the higher-priority source, so administrators should use the system file for values that users may override only when that product behavior is acceptable.
The migration flow preserves this boundary. It never writes merged system values into the user migration copy, which prevents an enterprise baseline from becoming a user-owned override by accident.
References: app/…/index.js• L18-20 app/…/index.js• L44-86 app/…/migrateFile.js• L27-31
Intune sign-in
The auth.intune settings enable optional Microsoft Intune single sign-on and select the account used for it. When enabled, the app initializes the identity service before it creates the main Teams view and uses the resulting sign-in data for Microsoft authentication requests.
Intune and multi-account mode are mutually exclusive in the current product. If both are enabled, the app keeps Intune and disables multi-account for that session because the host identity broker does not support concurrent enrollments reliably.
See enterprise device management for the enterprise sign-in and device-management view.
References: app/…/options.js• L974-1005 app/…/index.js• L675-687 app/index.js• L96-107 app/…/README.md• L45-58
Change checklist
When these files or sections are changed, remember to consider these:
- A change to an option definition must stay aligned with the generated reference and schema. The runtime parser and generated files share the same option source.
- A flat-to-nested rename must update the rename map, deprecation message, migration output, and the rule that decides which name wins.
- A new nested field must have matching nested validation metadata. Otherwise an unknown or wrongly typed leaf can pass through without the intended warning.
- A setting marked
livemust have a matching main-process change event and renderer consumer. Otherwise users can save a setting that only takes effect after restart. - System and user config changes must preserve user precedence and must not copy system-only values into a user migration file.
- A visual or behavioral customization must keep its config gate aligned across the main process, preload, and renderer. A mismatch can expose a control without enabling its service or enable a service without a usable UI.
- Changes to
auth.intunemust preserve the conflict rule with multi-account mode and the account selection contract used by the identity broker.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A config file contains an unknown key or wrong value type | The entry is ignored or does not affect the feature, while startup continues | Read the [CONFIG] warning and compare the key with the generated option reference |
| A user file cannot be parsed | The app uses the system file or built-in defaults instead of the intended user choices | Fix the JSON parse error before treating later behavior as a feature failure |
| A flat and nested spelling are both set | The nested spelling controls the resolved value | Remove the old spelling and keep the nested name as the source of truth |
| A migration target namespace is already a non-object value | That rename is left in the copy and cannot be converted automatically | Change the namespace to an object, then run the migration again |
| A restart-only setting is changed while the app is running | The current session keeps the old behavior | Relaunch the app after changing the setting |
| Intune SSO and multi-account mode are enabled together | Multi-account is disabled for the session | Choose Intune for managed sign-in or disable it before using multiple accounts |
| A custom background service is unavailable or has an invalid URL | The background list falls back to an empty local list or the default service path | Check the service URL and the saved background configuration |
| A custom CSS file cannot be read | The Teams view loads without that visual customization | Check the CSS path and file access, then reload the view |
Key files
| File | Why to read it |
|---|---|
| app/…/index.js | Shows how system, user, command-line, and environment settings become the startup configuration. |
| app/…/options.js | Defines the configuration contract and apply timing used by runtime and generated docs. |
| app/…/validator.js | Explains warn-only validation and the privacy boundary for configuration diagnostics. |
| app/…/renames.js | Shows compatibility between flat and nested option names. |
| app/…/migrateFile.js | Shows the safe, review-first migration path for a user's config file. |
| app/…/index.js | Shows how startup settings and persistent user stores are exposed to the rest of the app. |
| app/…/index.js | Illustrates how visual customization reaches the main page and embedded frames. |
| app/…/index.js | Illustrates the optional remote background service and its local fallback. |
| app/…/README.md | Describes the local sticker customization as a complete user feature. |
| app/…/index.js | Shows live setting changes and the user-facing migration action. |
| app/…/README.md | Explains the enterprise sign-in integration and its configuration boundary. |
| docs-site/…/configuration-generated.md | Provides the generated list of supported options, defaults, nested fields, and apply modes. |