Markdown Text Appears as HTML Tags When Posting to a Teams Bot
Hello,
When I send a request to post markdown text to a Teams bot, the HTML tags are displayed as plain text instead of being rendered correctly.
Example Request:
curl -X POST "https://smba.trafficmanager.net/apis/v3/conversations/{conversationId}/activities" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "message",
"text": "- test"
}'
Message Posted by the Bot:
Other markdown formats are also converted into raw HTML strings.
I observed the same behavior when checking on both a web browser and the Windows mobile app.
Additionally, I explicitly included "textFormat": "markdown"
in the request parameters, but the result remained unchanged.
My Teams client version is 49/25010620410.
Possible Causes
Do you have any insights into the cause of this issue? Some possible reasons I can think of include:
- Misconfiguration in the Teams app or bot settings
- Teams client settings
- Incorrect request method
- A bug in Microsoft Teams
Any guidance on this issue would be greatly appreciated.