weave
module · Comms & Incident

Microsoft Teams

Microsoft Teams — teams, channels, members, presence

Namespace: weave teams Env: AZURE_TENANT_ID
4
Commands
1
State kinds
Comms & Incident
Category
1
API docs

Setup

Configure credentials via environment variables. We recommend sourcing them through 1Password or your secrets manager rather than committing them to the shell rc.

Official API reference

weave commands for this module are checked against the vendor's published API.

Variable Description Status
AZURE_TENANT_IDRequired for authentication.required
AZURE_CLIENT_IDRequired for authentication.required
AZURE_CLIENT_SECRETRequired for authentication.required
GRAPH_API_VERSIONOverride Graph version (default: v1.0).optional

Sanity-check the wiring:

weave secrets check
weave teams --help
weave doctor   # reports AZURE_TENANT_ID status

Capabilities

What this module can do, by entity and verb. means a working CLI surface; · means not (yet) wired.

Entity findlistshowdosnapshotdiffapply
channel······
member······
team··

Commands

Every registered CLI command, grouped by verb. Each example uses placeholder arguments — substitute real values for your environment.

find (1)

find team

read

Find a Team by display name or id.

weave teams find team <identifier>

list (3)

list channels

read

List channels in a Team.

weave teams list channels <team-id>

list members

read

List members of a Team.

weave teams list members <team-id>

list teams

read

List all Teams in the tenant.

weave teams list teams <arg>
snapshot / diff / apply are generated automatically from the State Kinds declared on this module — see the State kinds section below for per-kind details. Workflow: snapshot → edit YAML → diffapply --yes (or confirm interactively; apply --dry-run previews the same diff).

State kinds

Resources this module can snapshot and diff; apply where the kind supports live writes (see Round-trip per kind). Always run diff before apply; use --yes in automation after review. Files live under .weave-state/teams/.

teams

snapshot diff apply

All Microsoft Teams with settings + owner UPNs (keyed by displayName).

Scope
Round-trip
Full round-trip — snapshot, diff, apply.

State file skeleton

module: teams
kind: teams
items:
  - # <fields specific to this kind — see snapshot output>

Workflows

End-to-end recipes from operators who already run this module in production. Copy, adapt, and put under change-control.

Teams settings and owners in git

weave teams snapshot teams
$EDITOR .weave-state/teams/teams.yaml
weave teams diff teams
weave teams apply teams --yes

Find a team before changing owners

weave teams find team "Platform Engineering"
weave teams list members --team-id=<team-id>
weave teams list channels --team-id=<team-id>

Quarterly Teams audit

weave teams list teams
weave teams snapshot teams
git add .weave-state/teams && git commit -m 'teams audit Q1'

Correlate with Entra group membership

Teams owners often mirror Entra groups — use activedirectory/entra for membership drift.

weave teams find team "Security Champions"
weave entra show group-members Security-Champions

Terraform parity

For each Terraform resource in the canonical provider, here's the equivalent live-API verb in weave. Use this as a migration cheat-sheet, not a 1:1 contract — weave deliberately stays in the live-state lane, not the desired-state lane.

Terraform resource weave equivalent
microsoftteams_teamweave teams snapshot/diff/apply teams + find/list team
Graph-backed; no HashiCorp provider with full parity — compare to azuread/microsoft teams resources.
microsoftteams_channelweave teams list channels
Read-only — channel create/archive not wired.
microsoftteams_team_memberweave teams list members
Member adds/removes not exposed — owner changes go through teams state kind.

Troubleshooting & source

Missing credentials

Run weave doctor — it reports which env vars (including AZURE_TENANT_ID) are set and which are blank.

Unexpected behaviour from a state apply

Re-run weave teams diff <kind> to confirm the controller's current state, then re-snapshot before the next apply. The driver always re-snapshots before diffing.