question

16494391 avatar image
0 Votes"
16494391 asked saldana-msft edited

How could I send an JSON message in content of request body using Graph API?

I'm using microsoft graph api to send messages to Microsoft Teams, and I noticed that in the request body all message content in "content" could only send single text.

I would like to send an JSON format message in the "content" block, so I set "contentType" as "application/json" in the request body, and the content look like this:

"content":{"value1":0.1, "value2":0.5}

However, it returns "Invalid request body content"

I could success by setting contentType as html, but how could I send JSON content?

microsoft-graph-sdkazure-ad-graph
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers