Microsoft Teams
Microsoft Teams — teams, channels, members, presence
weave teams
Env: AZURE_TENANT_ID
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_ID | Required for authentication. | required |
| AZURE_CLIENT_ID | Required for authentication. | required |
| AZURE_CLIENT_SECRET | Required for authentication. | required |
| GRAPH_API_VERSION | Override 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 | find | list | show | do | snapshot | diff | apply |
|---|---|---|---|---|---|---|---|
| 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
readFind a Team by display name or id.
weave teams find team <identifier>
list (3)
list channels
readList channels in a Team.
weave teams list channels <team-id>
list members
readList members of a Team.
weave teams list members <team-id>
list teams
readList all Teams in the tenant.
weave teams list teams <arg>
snapshot → edit YAML →
diff → apply --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
All Microsoft Teams with settings + owner UPNs (keyed by displayName).
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_team | weave teams snapshot/diff/apply teams + find/list team Graph-backed; no HashiCorp provider with full parity — compare to azuread/microsoft teams resources. |
| microsoftteams_channel | weave teams list channels Read-only — channel create/archive not wired. |
| microsoftteams_team_member | weave teams list members Member adds/removes not exposed — owner changes go through teams state kind. |
Troubleshooting & source
Run weave doctor — it reports which env
vars (including AZURE_TENANT_ID) are set
and which are blank.
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.
The module lives at https://github.com/andy-broyles/weavewhatever/tree/main/src/weave/modules/teams. File a bug or feature request at https://github.com/andy-broyles/weavewhatever/issues.