[Bug] Microsoft Teams Notification integration does not work
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=565839) </details> <!--IssueSummary end--> ### Summary Microsoft Teams integration in GitLab sends an invalid payload in the Adaptive Card, causing the Teams webhook workflow to fail. The payload contains an extra wrapper around the actual AdaptiveCard, making it invalid according to [Adaptive Card Designer](https://adaptivecards.io/designer/). ### Steps to reproduce 1. Set up Microsoft Teams integration in GitLab as per the official documentation: https://docs.gitlab.com/user/project/integrations/microsoft_teams/ 2. Trigger an event that sends a Teams notification (e.g., issue created). 3. Observe the failure in the webhook delivery. 4. Copy the payload and paste it into https://adaptivecards.io/designer/. 5. Validate the payload – it will be marked as invalid. ### Example Project Cannot share a public project due to confidentiality, but reproducible using any project with Teams integration enabled. ### What is the current *bug* behavior? GitLab sends a payload wrapped in: ```json { "contentType": "application/vnd.microsoft.card.adaptive", "content": { "type": "AdaptiveCard", ... } } ``` This structure is not accepted by Microsoft Teams for Adaptive Cards and fails validation in the Adaptive Card Designer. ### What is the expected *correct* behavior? Teams expects just the `AdaptiveCard` object directly, e.g.: ```json { "type": "AdaptiveCard", "msteams": { "width": "Full" }, "version": "1.0", "body": [...] } ``` ### Relevant logs and/or screenshots **Invalid payload being sent (as captured):** ```json { "contentType": "application/vnd.microsoft.card.adaptive", "content": { "type": "AdaptiveCard", "msteams": { "width": "Full" }, "version": "1.0", "body": [ { "type": "TextBlock", "text": "Issue opened by John Doe", "weight": "Bolder", "size": "Medium" }, ... ] } } ``` **Correct payload that passes validation:** ```json { "type": "AdaptiveCard", "msteams": { "width": "Full" }, "version": "1.0", "body": [ { "type": "TextBlock", "text": "my / repo", "weight": "Bolder", "size": "Medium" }, ... ] } ``` ### Output of checks <!-- Uncomment if relevant --> <!-- This bug happens on GitLab.com --> <!-- /label ~"reproduced on GitLab.com" --> #### Results of GitLab environment info <details> <summary>Expand for output related to GitLab environment info</summary> <pre> <!-- Include if using self-hosted instance --> </pre> </details> #### Results of GitLab application Check <details> <summary>Expand for output related to the GitLab application check</summary> <pre> <!-- Include if using self-hosted instance --> </pre> </details> ### Possible fixes Ensure that the payload sent to Microsoft Teams webhook is just the AdaptiveCard object without any additional wrapping in `contentType` and `content`. Relevant documentation reference: https://docs.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference#adaptive-cards ### Patch release information for backports N/A #### High-severity bug remediation N/A
issue