25,081 questions
How could I send an JSON message in content of request body using Graph API?
林彥良
21
Reputation points
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 Security Microsoft Entra Microsoft Entra ID
Microsoft Security Microsoft Graph
13,721 questions
Sign in to answer