Share via

Teams Incoming Webhook 403 Error in Lambda – Worked Until Last Night

Shree Varshan G 40 Reputation points
2026-06-02T06:32:28.3766667+00:00

Hello,

I am using a Teams channel incoming webhook to send notifications from an AWS Lambda function.

Context / Setup:

  • Lambda sends POST requests using axios with the following payload (Adaptive Card JSON):
{
  "type": "message",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "content": { ... }
    }
  ]
}

The webhook URL is from a Teams channel in the same tenant.

  • This setup has been working fine until yesterday (~10 PM IST).
  • Since then, all Lambda invocations return:

Error: Request failed with status code 403

Minimal curl test also returns 403 Forbidden:

curl -H "Content-Type: application/json" -d '{"text": "Test message"}' <webhook-url>

Questions:

  1. Could something have changed on the Teams side (tenant, webhook validity, adaptive card version support) that causes the webhook to fail after 10 PM?
  2. Are there any known restrictions, throttling, or IP blocks that could cause a previously working webhook to suddenly return 403?
  3. Any recommended debugging steps or workarounds to confirm whether the issue is webhook-related or payload-related?

Thanks in advance!

Microsoft Teams | Development
Microsoft Teams | Development

Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs


Answer accepted by question author

Teddie-D 17,970 Reputation points Microsoft External Staff Moderator
2026-06-02T08:07:46.6033333+00:00

Hi Shree Varshan G

Please note that we're not Microsoft support, this is a user-to-user support forum. Moderators here don’t have backend access to Microsoft systems, so we can only provide technical guidance based on the public resources.

Since your webhook was working previously and now returns HTTP 403 even for a minimal payload, the suggestion from Ahmed Karkar is directionally correct.

According to Retirement of Office 365 connectors within Microsoft Teams, Microsoft is in the process of retiring Office 365 connectors which include Teams Incoming Webhooks, and there have been ongoing changes to webhook infrastructure and URL handling.

As also noted in Create an Incoming Webhook - Teams | Microsoft Learn, Microsoft 365 connectors are nearing deprecation, and users are encouraged to transition to newer approaches such as Workflows-based webhooks.

While deprecation does not necessarily mean existing webhooks stop working immediately, these platform changes may result in older or previously configured webhook URLs becoming invalid or rejected. This can explain why your webhook suddenly started returning 403, and even a minimal curl test fails regardless of the payload.

To resolve the issue, you should:

  • recreate the incoming webhook URL in the Teams channel and test again
  • verify that the connector is still active and allowed in your tenant

You may also consider migrating to a Workflows-based webhook for long-term reliability.

Reference: Send messages in Teams using incoming webhooks | Microsoft Support 


Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Ahmed Karkar 0 Reputation points
    2026-06-02T06:35:35.64+00:00

    Step 1: Generate a New Workflow URL in Teams

    Step 2: Update Your Lambda Environment Variables

    Step 3: Payload Verification

    {

    "type": "message",

    "attachments": [

    {
    
      "contentType": "application/vnd.microsoft.card.adaptive",
    
      "contentUrl": null,
    
      "content": {
    
        "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    
        "type": "AdaptiveCard",
    
        "version": "1.4",
    
        "body": [
    
          {
    
            "type": "TextBlock",
    
            "text": "Alert from AWS Lambda",
    
            "weight": "Bolder",
    
            "size": "Medium"
    
          }
    
        ]
    
      }
    
    }
    

    ]

    }

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.