0

I have an application that sends chat message like so:

const currentUserId: any = await msGraphProvider.getCurrentUserId();
const userIdToSendMessage: any = await msGraphProvider.getUserId(dpcRequest.SendQuestionsTo.EMail);
const chatOfUser: any = await msGraphProvider.createUsersChat(userIdToSendMessage, currentUserId);
const result: any = await msGraphProvider.sendMessage(chatOfUser, text);

the text variable should have few new lines in it but anything I send is disregarded. I tried
but it is not HTML also \r\n\r\n , \n but it is ignored too

Any Idea how to format new lines? Thanks

Ofer Gal
  • 707
  • 1
  • 10
  • 32
  • Can you please share the Graph API documentation link that you are following, so that I can further check on the issue ? Are you using C# Graph SDK or another one? – ChetanSharma-msft Jul 28 '22 at 17:02

1 Answers1

0

A simple text message like this (as opposed to, say, an Adaptive Card message) actually uses markdown, just fyi - you can see more at https://support.microsoft.com/en-us/office/use-markdown-formatting-in-teams-4d10bd65-55e2-4b2d-a1f3-2bebdcd2c772

That doesn't help you though, it's just fyi. For newline, this might be relevant: How to insert newline into MS Teams markdown?

Hilton Giesenow
  • 9,809
  • 2
  • 10
  • 24