Skip to content
Latchkey

Microsoft Teams connector deprecated / switch to Workflows URL in CI

Microsoft retired Office 365 Connectors (the classic "Incoming Webhook" in a channel) in favor of Power Automate Workflows. Old connector URLs stop delivering, and posts either fail or silently drop. The fix is to create a Workflows-based webhook and send an Adaptive Card.

What this error means

A Teams notify step that worked for months returns a 4xx, an error page, or delivers nothing. The webhook URL points at the legacy connectors host rather than a Power Automate flow.

Teams webhook
< HTTP/1.1 400 Bad Request
Bad payload received by generic incoming webhook.

Common causes

The legacy connector was retired

Classic Office 365 Connector webhooks are being turned off; a URL tied to a retired connector no longer delivers.

The new endpoint expects a different payload

Even after migrating, sending a MessageCard to a Workflows URL fails because Workflows expects an Adaptive Card attachment.

How to fix it

Create a Workflows incoming webhook

  1. In the target Teams channel, add a Workflow using the "Post to a channel when a webhook request is received" template.
  2. Copy the generated HTTP POST URL.
  3. Replace the old TEAMS_WEBHOOK_URL secret with the new Workflows URL.
Terminal
curl -sS -X POST -H 'Content-Type: application/json' \
  --data @card.json "$TEAMS_WEBHOOK_URL"

Send an Adaptive Card attachment

Workflows endpoints require the message/attachments envelope with an Adaptive Card.

card.json
{"type":"message","attachments":[{"contentType":"application/vnd.microsoft.card.adaptive","content":{"type":"AdaptiveCard","version":"1.4","body":[{"type":"TextBlock","text":"CI build passed"}]}}]}

How to prevent it

  • Migrate any remaining connector webhooks to Power Automate Workflows.
  • Store the Workflows URL in a secret and update it in one place.
  • Assert a 2xx status so a retired endpoint fails the notify step.

Frequently asked questions

What causes "Teams connector retired"?
Classic Office 365 Connector webhooks are being turned off; a URL tied to a retired connector no longer delivers.
How do I fix Teams connector retired?
Create a Workflows incoming webhook

Related guides

References

Run this faster and cheaper on Latchkey managed runners - self-healing included. Start free → 30-day trial · No credit card