Microsoft Teams rendering is broken.
Sometime this week the rendering for markdown was broken for microsoft teams.
"text":"Hello there\n","textFormat":"markdown"
renders as:

I am unable to reproduce the issue with the text and textFormat fields matching what you specified above.
Do you have the exact message JSON your bot replied with when you saw the issue?
yes, I'll get it for you tomorrow morning.
POST /v3/conversations/19:c3ec28d6-7188-45ec-996a-1e9341a6e307_0b45f374-86b1-4dcd-9e4f-bf17f573d6fc@unq.gbl.spaces/activities HTTP/1.1
Host: skype.botframework.com
User-Agent: Go-http-client/1.1
Content-Length: 516
Accept: application/json
Accept: text/json
Content-Type: application/json
Accept-Encoding: gzip
[1B blob data]
{"attachments":null,"channelId":"msteams","conversation":{"id":"19:c3ec28d6-7188-45ec-996a-1e9341a6e307_0b45f374-86b1-4dcd-9e4f-bf17f573d6fc@unq.gbl.spaces"},"entities":null,"from":{"id":"28:0b45f374-86b1-4dcd-9e4f-bf17f573d6fc"},"localTimestamp":"2016-12-09T12:54:50.876Z","membersAdded":null,"membersRemoved":null,"recipient":{"id":"c3ec28d6-7188-45ec-996a-1e9341a6e307"},"serviceUrl":"https://skype.botframework.com","text":"Hey\n","textFormat":"markdown","timestamp":"2016-12-09T12:54:50.876Z","type":"message"}
HTTP/1.1 201 Created
Content-Length: 76
Cache-Control: no-store, must-revalidate, no-cache
Content-Type: application/json; charset=utf-8
Contextid: tcid=5814923934324425586,server=EAP010201162142
Date: Fri, 09 Dec 2016 12:54:49 GMT
Pragma: no-cache
Server: Microsoft-IIS/8.0
Strict-Transport-Security: max-age=31536000
X-Powered-By: ASP.NET
[1B blob data]
{"id":"0:1f84W4O6YLHQUtRb9so0L2S4zZbf-EklYKu-ntN9LdBJiVTbW07JolMtXpBDX_pTY"}
any update on this?
We are investigating
well let me know if there is anything I can do to help.
Hey there: we can't repro here. Are you still seeing the issue?
yes. no change. did you guys adjust the service url for ms teams? I'm still using the skype endpoint.
but something changed on the botframework's endpoint as it went from rendering properly to rendering html. I feel like its getting rendered twice somewhere after it leaves our system into yours.
things to note: this happens when in the teams UI? not skypes. not sure if that could be why you can't reproduce.
I'm not seeing this in Teams UI, desktop or web, nor in the emulator, and I'm hitting skype.botframework.com. I've tried recreating your exact message from above, and even played with other markdown formats, but it's all displaying correctly.
hmm interesting. now is there any configuration that may impact this that is done over at https://dev.botframework.com/bots?
for example is microsoft teams enabled for you? what about skype? (we have both enabled) What about how the api credentials were created? we did that at https://apps.dev.microsoft.com/.
Will providing you with an environment this is occurring in help you? I'm happy to invite one of you to our teams development and give you the bot id to message. I'm really not sure what could be causing this if you replayed exactly the messages I provided above.
All I did was take a sample bot (Send Attachment Bot Sample in my case) and modify output to display markdown. I registered it with both Teams and Skype. Perhaps that would be a quick test for you to see if there's something specific in your implementation?
@RichMoeMSFT alright I've discovered the issue (finally had a chance to investigate this particular issue)
apparently I was stripping the 8:orgid: prefix from the recipient field. without this it renders improperly I would expect an error of some sort. instead my message gets mangled based on the recipient id.... which doesnt really make sense. I'd understand the serviceURL or channelId influencing the rendering, but the recipient id?
I was doing the stripping to map the ID's to the microsoft o365 accounts, and I was reusing the stripped version to send the message (accidentally). Still feel this behaviour is a bug.
Thanks for the clarification. FYI we'll be providing more channel-specific schema guidance for Teams soon. That is a field you should not count on extracting meaningful data from.
@RichMoeMSFT normally I'd agree with you but the lack of a way to retrieve accounts via the api makes it a necessary evil in order to correctly map people from a office organization who havent sent the bot a message. hence extracting the o365 id out of the message.
We'll have additional support coming soon which should allow you to get the information you need, without having to do evil ;)
Figured there would eventually be a way whichis why i took the shortcut. I still think the rendering is a bug though. ;) Question will the ids map cleanly to o365?
@RichMoeMSFT looks like a change was made to the from ID format, however there still isn't a way to generate a list of ids from the api. makes mapping internal system ID's to msteams ID's impossible. particularly since I'm not sure what the encoding format is being used for the new ID.
new format:
"from": {
"id": "29:1xUE_8WVVQxzRRQw54AkdMuRMeIfaDgHB89Nfph2bAD_BPYuyi6ulw-r80Mhv4Q5p4G8lCViMyxScjYwMQo6uGg",
"name": "James Lawrence"
}
old format:
"from": {
"id": "8:orgid:c3ec28d6-7188-45ec-996a-1e9341a6e307",
"name": "James Lawrence"
}
@james-lawrence are you still experiencing this issue?