Kumar Tech
Kumar Tech

Reputation: 61

Issue on getting the user submitted input data from Adaptive card posted via MSTeams Graph API

We are facing issue on getting the user submitted input data from Adaptive card posted via MSTeams Graph API. We have a Team Channel that has two members:Global Admin and the user. We posted the following Adaptive card using Global Admin token.

{
        "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
        "type": "AdaptiveCard",
        "version": "1.3",
        "body": [
            {
                "type": "TextBlock",
                "text": "Specify the type of text being requested:"
            },
            {
                "type": "Input.Text",
                "id": "myComment",
                "label": "style: text"              
            }
        ],
        "actions": [
            {
                "type": "Action.Submit",
                "title": "OK",
                "data":{
                    "type":"submit"
                }            
            }
        ]
    }

We have a subscription for resource /teams/${teamId}/channels/${channelId}/messages with changeType as 'created'

When the user clicks the 'OK' button we are not receiving any event in the subscribed end point.

Is there any other resource, changeType need to be added or we need to listion ant other particular event from MSTeams to get the user submitted values?

Please help us to resolve the issue.

Regards, Raja

Upvotes: 0

Views: 167

Answers (1)

Hunaid Hanfee-MSFT
Hunaid Hanfee-MSFT

Reputation: 926

It is not possible to get Adaptive card input with subscriptions. Instead you can have a Bot having teams as a scope in manifest, which will send an adaptive card and you can get the input from there. That is much easier.

We have sample created in c_sharp, here is the link

https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/csharp_dotnetcore

Upvotes: 1

Related Questions