title: Task Module call from Ms Teams in Bot Framework
body: <p>I am looking to open a task module (Pop up - iframe with audio/video) in my bot that is connected to Teams channel. I am having issues following the sample code provided on the GitHub page.</p>
  
  <p>I have tried to follow the sample and incorporate to my code  by did not succeed. </p>
  
  <p>In my bot.cs file I am creating card action of invoke type: </p>
  
  <pre><code>card.Buttons.Add(new CardAction("invoke", TaskModuleUIConstants.YouTube.ButtonTitle, null,null,null,
                  new Teams.Samples.TaskModule.Web.Models.BotFrameworkCardValue&lt;string&gt;()
                  {
                      Data = TaskModuleUIConstants.YouTube.Id
                  }));
  </code></pre>
  
  <p>In my BotController.cs that inherits from Controller</p>
  
  <pre><code>   [HttpPost]
          public async Task PostAsync()
          {
              // Delegate the processing of the HTTP POST to the adapter.
              // The adapter will invoke the bot.
             await _adapter.ProcessAsync(Request, Response, _bot);        
  
          }
  
          public async Task&lt;HttpResponseMessage&gt; Post([FromBody] Activity activity)
          {
             if (activity.Type == ActivityTypes.Invoke)
              {
                  return HandleInvokeMessages(activity);
              }
  
              return new HttpResponseMessage(HttpStatusCode.Accepted);
          }
  
          private  HttpResponseMessage HandleInvokeMessages (Activity activity)
          {
  
              var activityValue = activity.Value.ToString();
              if (activity.Name == "task/fetch")
              {
                  var action = Newtonsoft.Json.JsonConvert.DeserializeObject&lt;Teams.Samples.TaskModule.Web.Models.BotFrameworkCardValue&lt;string&gt;&gt;(activityValue);
  
                  Teams.Samples.TaskModule.Web.Models.TaskInfo taskInfo = GetTaskInfo(action.Data);
                  Teams.Samples.TaskModule.Web.Models.TaskEnvelope taskEnvelope = new Teams.Samples.TaskModule.Web.Models.TaskEnvelope
                  {
                      Task = new Teams.Samples.TaskModule.Web.Models.Task()
                      {
                          Type = Teams.Samples.TaskModule.Web.Models.TaskType.Continue,
                          TaskInfo = taskInfo
                      }
                  };
                  return msg;
              }
  
              return new HttpResponseMessage(HttpStatusCode.Accepted);
          }
  </code></pre>
  
  <p>There is more code as per the GitHub sample but I won't paste it here. Can someone point me into the correct direction ? </p>
  
  <p>I have got to the stage that it is displaying a pop up window but the content and title comes from manifest file instead of creating actual iframe also no video is rendering. My goal is to render video within my teams using iframe container.
  <a href="https://i.stack.imgur.com/tyvXE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tyvXE.png" alt="enter image description here"></a></p>