Skip to content

Migrate from v1

This guide covers migration from the legacy v1 standalone agent (global flags) to the current Standalone collector (ms_teams_observability with sub-commands).

Topicv1Standalone
CLIGlobal flags (--config, --ignore_state, …)Sub-commands (run, validate, migrate-config, service, state, test-connection)
ConfigurationLegacy keys (microsoft_*, ms_teams_* features)Typed keys (microsoft_authentication.graph, short feature names)
Config migrationNo dedicated migration commandAutomatic migration at startup when legacy format is detected, with on-disk rewrite and .bak backup
StateJSON per tenant (state/state_<tenant>.json)SQLite (state.db) with deduplication + outbox
Linux service--enable_boot_start / --disable_boot_startservice enable-service / service disable-service
site_definition featureSupportedRemoved (ignored)
v1Standalone
ms-teams-agent --versionms-teams-agent --version
ms-teams-agent --config config.yamlms-teams-agent run --config config.yaml
ms-teams-agent --config config.yaml --call_id <ID>ms-teams-agent run --config config.yaml --call-id <ID>
ms-teams-agent --config config.yaml --ignore_statems-teams-agent run --config config.yaml --ignore-state
(implicit at startup)ms-teams-agent validate --config config.yaml
(no equivalent)ms-teams-agent test-connection --config config.yaml
(no equivalent)ms-teams-agent state show / reset / export
--enable_boot_startservice enable-service --config <path>
--disable_boot_startservice disable-service
--service_name_suffix=-prod--instance prod
--force_service_creation--force-service-creation
v1 keyStandalone key
microsoft_authentication.microsoft_tenant_idmicrosoft_authentication.graph.tenant_id
microsoft_authentication.microsoft_client_idmicrosoft_authentication.graph.client_id
microsoft_authentication.microsoft_client_secretmicrosoft_authentication.graph.client_secret
microsoft_authentication.microsoft_client_assertion_typemicrosoft_authentication.graph.client_assertion_type
microsoft_authentication.microsoft_client_certificate_pathmicrosoft_authentication.graph.client_certificate_path
microsoft_authentication.microsoft_client_certificate_passphrasemicrosoft_authentication.graph.client_certificate_passphrase
microsoft_authentication.microsoft_scopemicrosoft_authentication.graph.scope
microsoft_authentication.microsoft_grant_typemicrosoft_authentication.graph.grant_type
microsoft_authentication.microsoft_usernamemicrosoft_authentication.vaac.username
microsoft_authentication.microsoft_passwordmicrosoft_authentication.vaac.password
v1 keyStandalone key
collection_config.microsoft_max_call_duration_hourscollection_config.max_call_duration_hours
collection_config.logfile_log_levelcollection_config.log_level
collection_config.license_filelicense.filepath
collection_config.logging_servicesRemoved (ignored)
v1 feature keyStandalone feature key
ms_teams_calls_collectioncalls_collection
ms_teams_issues_collectionissues_collection
ms_teams_pstn_calls_collectionpstn_calls_collection
ms_teams_direct_routing_calls_collectiondirect_routing_calls_collection
ms_teams_autoattendant_collectionautoattendant_collection
ms_teams_callqueue_collectioncallqueue_collection
ms_teams_site_definitionRemoved (ignored)
microsoft_authentication:
graph:
tenant_id: "<tenant_id>"
client_id: "<client_id>"
client_secret: "<client_secret>"
scope: "https://graph.microsoft.com/.default"
grant_type: "client_credentials"
vaac:
username: "<vaac_username>"
password: "<vaac_password>"
license:
filepath: "/etc/ms-teams-observability-agent/license.json"
output:
console:
enabled: true
collection_config:
max_call_duration_hours: 5
interval_collection_minutes: 1
log_level: "INFO"
features:
calls_collection:
enabled: true
issues_collection:
enabled: false
pstn_calls_collection:
enabled: false
direct_routing_calls_collection:
enabled: false
autoattendant_collection:
enabled: false
callqueue_collection:
enabled: false

When the collector loads a legacy-format YAML config, Standalone automatically:

  1. migrates keys to the current schema,
  2. creates a backup file next to the original config (<config>.bak),
  3. rewrites the migrated YAML to disk.

This auto-migration runs on startup when needed.

When to Use migrate-config vs Auto-Migration

Section titled “When to Use migrate-config vs Auto-Migration”
  • Use migrate-config when you want to migrate and review config files before runtime (for example in CI or change-management workflows).
  • Rely on auto-migration when starting the collector normally and you are comfortable with startup-time migration.

Standalone does not read the v1 JSON state (state/state_<tenant>.json) automatically at startup. You can still migrate v1 state manually with the temporary CLI command:

Terminal window
ms-teams-agent state migrate-v1 --source ./state-v1.json

See Temporary Migration Command for details and non-interactive flags.

If you prefer a clean cutover, starting with a clean state remains a valid path:

Terminal window
ms-teams-agent run --config ./config.yaml --ignore-state

Then run continuously:

Terminal window
ms-teams-agent run --config ./config.yaml
  1. Back up v1 config, license, state JSON, and any service scripts.
  2. Create a config.yaml in Standalone format using the key mapping above.
  3. Validate the config:
    Terminal window
    ms-teams-agent validate --config ./config.yaml
  4. Test Graph auth and exporters:
    Terminal window
    ms-teams-agent test-connection --config ./config.yaml
  5. Optional — dry run without exporting:
    Terminal window
    ms-teams-agent run --config ./config.yaml --dry-run --ignore-state
  6. Switch to production run or systemd service.
v1Standalone
sudo ms-teams-agent --config <path> --enable_boot_startsudo ms-teams-agent service enable-service --config <path>
sudo ms-teams-agent --config <path> --disable_boot_startsudo ms-teams-agent service disable-service
--service_name_suffix=-prod--instance prod