As known, Teams Connectors will be disabled from the end of 2024.
Incoming Webhook Connectors in Teams inform that an update is required.
It is unclear to me whether the update is the necessary update for a connector to continue working until the end of 2025. Microsoft has not yet published any information.
*************
Update from 24 October 2024:
Microsoft has confirmed that the URL update is the extension until 31 December 2025. The period for adapting the URL has also been extended until 31 January 2025 (previously 31 December 2024).
*************
Teams will update the webhook URL. It adds an additional parameter to the end of the URL.
Instead of the Incoming Webhook Connector, a new Power Automate workflow should be used in the Teams channel.
Microsoft has published a support post and Martin Heusser has also published instructions for migrating from Incoming Webhook Connector to Power Automate Workflow.
Compared to the HTTP Trigger, no premium license is required for Incoming Webhook in Power Automate.
The webhook from Power Automate returns a new webhook URL.
One advantage of the new webhook is that you can define who can send messages to the URL. The webhooks from the old Teams Connector were generally open to “anyone who knows the URL”. It is still the default configuration in a Power Automate webhook. Open your flow in Power Automate to make a change on the permissions.
In my tests with PowerShell, I did not have to change anything in the body of the Adaptive Card compared to the old webhook.
However, during my tests I realized that the webhook URL from Power Automate supports Adaptive Cards up to schema 1.4. Teams cannot display the card with schema 1.5.
In direct comparison, the webhook URL from the old Teams Connector can display schema 1.5.
In my example, the second message was sent via Power Automate Webhook with schema 1.5. It does not work with schema 1.5, it works with schema 1.4.
Here is my sample.
$AdaptiveCard = @"
{
"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",
"msteams": {
"width": "Full"
},
"body": [
{
"type": "TextBlock",
"size": "Large",
"weight": "Bolder",
"text": "Hello World",
"style": "heading",
"wrap": true
},
{
"type": "TextBlock",
"text": "Power Automate Webhook, with schema version 1.4",
"wrap": true,
"separator": true
}
]
}
}
]
}
"@
$WebhookURL = "<WebhookURL>"
Invoke-RestMethod -Method POST -Uri $WebhookURL -Body $AdaptiveCard -ContentType "application/json;charset=utf-8"