I figured out how to do it, granted I'm doing it through AWS Lambda as SNS drives the notifications for CodeCommit Pull request updates, but it might still work for your purposes.
I set up an Incoming Webhook to my team's channel that is specifically used for developers and am using this JSON payload in the POST request:
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "Hi <at>General</at>"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0",
"msteams": {
"entities": [
{
"type": "mention",
"text": "<at>General</at>",
"mentioned": {
"id": "CHANNEL_ID",
"conversationIdentityType": "channel",
"conversationIdentityType@odata.type": "#Microsoft.Teams.GraphSvc.conversationIdentityType",
}
}
]
}
}
}]
}
The CHANNEL_ID is the URL decoded ID of the channel. I found this by going to the channel you want to send the notifications to in MS Teams, click on the three dots in the upper right corner, and select "Get link to channel". The way the URL is formatted is:
https://teams.microsoft.com/l/channel/CHANNEL_ID/Notifications?groupId=UUID&tenantId=UUID
and the CHANNEL_ID will be in the format of "<some numbers>:<some more numbers>@thread.tacv2". Others have a similar format, but the ending is "@thread.skype".
Hope this helps! It sure as hell helped me.