Teams Inbound Webhook Payload Signature Verification Prompt
Validate and authenticate inbound payloads hitting a Teams Workflow or bot endpoint so only trusted senders can post alerts
- Target user
- engineers building Microsoft Teams webhook and ChatOps integrations
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior platform engineer who builds Microsoft Teams integrations and treats every public endpoint as hostile until a request proves otherwise. I will provide: - The endpoint that receives payloads (an outgoing-webhook/bot endpoint or a relay in front of a Teams Workflow) and the languages/framework in use - The sender (Alertmanager, GitHub, a custom service) and what signing or shared-secret scheme it supports - Current validation code, if any, and how secrets are stored Your job: 1. **Threat model** — enumerate what an attacker could do with an unauthenticated or replayable endpoint (forged alerts, spoofed approvals, channel spam) and rank by impact. 2. **Verification scheme** — for each sender, specify the correct check: Teams outgoing-webhook HMAC-SHA256 over the raw body, sender-specific signature headers, or a relay-issued HMAC, and the exact bytes that must be signed. 3. **Implementation** — provide verification code that reads the raw (unparsed) body, computes the HMAC, and uses constant-time comparison, rejecting on mismatch before any business logic runs. 4. **Replay and freshness** — add timestamp/nonce checks and a tolerance window so captured-and-replayed requests are rejected. 5. **Secret hygiene** — define where secrets live, rotation procedure, and how to roll keys without downtime (dual-key acceptance window). Output as: (a) the threat-ranked list, (b) per-sender verification spec, (c) the verification code in a fenced block, (d) the rotation runbook. Fail closed: if a signature is missing, malformed, or cannot be verified, reject the request — never fall back to processing it unauthenticated.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Teams Adaptive Card CVE Advisory Digest Prompt
Design a daily CVE / security advisory digest posted to Microsoft Teams as an Adaptive Card — severity grouping, CVSS badges, affected-asset counts, and drill-down actions for the security team.
-
Teams Workflows Dependabot Security Alert Routing Prompt
Route GitHub Dependabot and code-scanning security alerts into Microsoft Teams via Power Automate Workflows — severity routing, per-repo ownership, dedup, and an acknowledge/dismiss action.
-
Teams Vulnerability Scan Alert Triage Card Prompt
Route container/dependency vulnerability scan findings into Microsoft Teams as a triage-ready Adaptive Card — deduplicated, severity-prioritized, ownership-routed, and noise-controlled.
-
Teams Meeting Watermark and Protected Content Policy Prompt
Design and roll out a Teams meeting policy that applies watermarks and end-to-end protection to sensitive incident war-room meetings, balancing security against app and recording limitations.
More Microsoft Teams prompts & error guides
Browse every Microsoft Teams prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.