Forum Discussion

maheshkumargunasekaran's avatar
maheshkumargunasekaran
Copper Contributor
Sep 02, 2021

Adaptive Card button should return "MessagingExtensionActionResponse"

Hi All,

 

Our application used to send notification to MS Teams users via bot. The application has been developed through C#. We have created a button with the below code.

 

Actions =
{
new AdaptiveSubmitAction()
{
Type = AdaptiveSubmitAction.TypeName,
Title = "Click Here",
},
},

 

By default, it invoked OnMessageActivityAsync(). Later we have added below piece of code in the button property.

 

Data = new TaskModuleDetail<string>() { Data = "SignIn", CommandId = "SignIn" },

 

In the class file of TaskModuleDetail, we have defined the Type as below.

public object Type { get; set; } = JsonConvert.DeserializeObject("{\"type\": \"task/fetch\" }");

 

Hence it is redirecting to OnTeamsTaskModuleFetchAsync().

 

But am expecting the click event of button should hit OnTeamsMessagingExtensionFetchTaskAsync() which returns MessagingExtensionActionResponse as i need to do launch an URL and perform authentication. 

 

Could someone help me to fix it?

Resources