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 Security | Microsoft Graph

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

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