Microsoft Graph Explorer presents schema error for the "Adaptive Card" type

Antonio Carlos Ghiraldello 0 Reputation points
2025-02-21T21:06:46.1033333+00:00

I’m looking for guidance regarding an error when using the Microsoft Graph Explorer POST method for "Adaptive Card" to Microsoft Teams.

Below, you can notice that the communication works fine when I use a simpler JSON. However, when I use the "Adaptive Card" type JSON, I receive the error message: "Property body in payload has a value that does not match schema.":

success JSON

{ "body": { "content": "Hello World" } }

not success JSON

Link adaptive cards samples

{

  "type": "AdaptiveCard",

  "body": [

    {

      "type": "TextBlock",

      "size": "medium",

      "weight": "bolder",

      "text": "${title}",

      "style": "heading",

      "wrap": true

    },

    {

      "type": "ColumnSet",

      "columns": [

        {

          "type": "Column",

          "items": [

            {

              "type": "Image",

              "style": "person",

              "url": "${creator.profileImage}",

              "altText": "${creator.name}",

              "size": "small"

            }

          ],

          "width": "auto"

        },

        {

          "type": "Column",

          "items": [

            {

              "type": "TextBlock",

              "weight": "bolder",

              "text": "${creator.name}",

              "wrap": true

            },

            {

              "type": "TextBlock",

              "spacing": "none",

              "text": "Created {{DATE(${string(createdUtc)}, SHORT)}}",

              "isSubtle": true,

              "wrap": true

            }

          ],

          "width": "stretch"

        }

      ]

    },

    {

      "type": "TextBlock",

      "text": "${description}",

      "wrap": true

    },

    {

      "type": "FactSet",

      "facts": [

        {

          "$data": "${properties}",

          "title": "${key}:",

          "value": "${value}"

        }

      ]

    }

  ],

  "actions": [

    {

      "type": "Action.ShowCard",

      "title": "Set due date",

      "card": {

        "type": "AdaptiveCard",

        "body": [

          {

            "type": "Input.Date",

            "label": "Enter the due date",

            "id": "dueDate"

          },

          {

            "type": "Input.Text",

            "id": "comment",

            "isMultiline": true,

            "label": "Add a comment"

          }

        ],

        "actions": [

          {

            "type": "Action.Submit",

            "title": "OK"

          }

        ],

        "$schema": "http://adaptivecards.io/schemas/adaptive-card.json"

      }

    },

    {

      "type": "Action.OpenUrl",

      "title": "View",

      "url": "${viewUrl}",

      "role": "button"

    }

  ],

  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",

  "version": "1.5"

}

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,113 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.