MS Teams Adaptive Card - I have send adaptive card templates with Graph API ,How to send a data from adaptive card to Api end endpoint to handle that data?

Anonymous
2023-10-30T11:11:35.5733333+00:00

KV```typescript {

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

"type": "AdaptiveCard",

"version": "1.5",

"body": [

    {

        "type": "TextBlock",

        "text": "Task List:"

    },

    {

        "type": "Input.Toggle",

        "id": "checkbox1",

        "title": "Task 1",

        "value": "Completed",

        "wrap": true

    },

    {

        "type": "Input.Toggle",

        "id": "checkbox2",

        "title": "Task 2",

        "value": "Completed",

        "wrap": true

    },

    {

        "type": "ActionSet",

        "actions": [

            {

                "type": "Action.Submit",

                "title": "Update",

                 "url":"https://Example.azurewebsites.net/api/HandleAdaptiveCardResponse"

            }

        ] 

I have send above adaptive card to team channel using graph Api endpoint ,I want send checkbox data to Api endpoint to handle that data ,but I am not able to hit Api endpoint(Azure function hosted on azure portal) ,how can I send checkbox data to Api endpoint .
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,639 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,768 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,472 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Meghana-MSFT 3,911 Reputation points Microsoft Vendor
    2023-10-31T17:33:31.9233333+00:00

    The only card action supported on cards sent through Graph is openurl.

    Action.Submit and other actions are not supported when card is being sent through Graph API.

    As a work around please refer below documentation and sample

    1. https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-actions?tabs=json#adaptive-cards-actions
    2. https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-adaptive-card-actions/csharp
    0 comments No comments

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.