HttpPOST Authorization header is overwritten by Teams

Mike Gorman 5 Reputation points
2024-03-17T13:26:16.34+00:00

I have a MessageCard I send to Teams via Incoming Webhook. It contains a HttpPOST action which includes an Authorization header. After much research, I have discovered Teams overwrites this with its own JWT value making it impossible for the resulting HTTP POST to authenticate with the endpoint I am targeting. I do not control the endpoint and the endpoint only supports passing a token via HTTP Authorization header.

Is there any workaround?

Microsoft Teams | Development
{count} votes

1 answer

Sort by: Most helpful
  1. Sayali-MSFT 3,996 Reputation points Microsoft External Staff Moderator
    2024-12-16T10:26:27.5166667+00:00

    Hello Mike Gorman,
    This is by design. Please find the related documentation here for sender validation & verification: Security requirements for actionable messages - Outlook Developer | Microsoft Learn

    Also, please note that the Connectors feature is on a deprecation timeline: Retirement of Office 365 connectors within Microsoft Teams and users are encouraged to move to Power Automate/Workflows for these use cases.

    0 comments No comments

Your answer

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