title: How to send a 'conversationUpdate' to Microsoft Teams from bot manually?
body: <p>I have a bot written with the help of bot <code>framework v4</code>. The bot is integrated with Microsoft Teams. I want to send a welcome message to the user when the user installed the bot and joins the 1:1 conversation. In Teams the <code>conversationUpdate</code> is fired exactly once (this is when the suer joins the 1:1 conversation) and then never again for that user. My idea was to write a function that is triggered by a chat message to send the <code>updateConversation</code> activity manually to debug the welcome message.</p>
  
  <p>I failed so far and got a </p>
  
  <blockquote>
    <p>BadArgument: Unknown activity type exception.</p>
  </blockquote>
  
  <p>I have tried using the <a href="https://github.com/OfficeDev/BotBuilder-MicrosoftTeams" rel="nofollow noreferrer">Microsoft.Bot.Builder.Teams</a> nuget using the <code>ConnectorClient</code> to send the <code>conversationUpdate</code> activity to the conversation.</p>
  
  <p>Also I set up a console application and tried using the <code>v3/directline/conversations/{conversationId}/activities</code> and got a <code>Forbidden</code> error.</p>
  
  <pre><code>private async Task SendConversationUpdateToTeamsAsync(ITurnContext turnContext, CancellationToken cToken = default)
  {
      var connectorClient = turnContext.TurnState.Get&lt;IConnectorClient&gt;();
  
      var conversationUpdateMessage = new Activity
      {
          Type = ActivityTypes.ConversationUpdate,
          Id = turnContext.Activity.Id,
          ServiceUrl = turnContext.Activity.ServiceUrl,
          From = turnContext.Activity.From,
          Recipient = turnContext.Activity.Recipient,
          Conversation = turnContext.Activity.Conversation,
          ChannelData = turnContext.Activity.ChannelData,
          ChannelId = turnContext.Activity.ChannelId,
          Timestamp = turnContext.Activity.Timestamp,
          MembersAdded = new List&lt;ChannelAccount&gt;
          {
              turnContext.Activity.From,
              turnContext.Activity.Recipient
          },
      };
  
      var result = await connectorClient.Conversations.SendToConversationAsync(conversationUpdateMessage, cToken);
  }
  </code></pre>
  
  <p>I expect that sending a <code>conversationUpdate</code> manually to debug the behavior in Teams works. Creating new users in the office portal and installing the bot for them to debug the <code>conversationUpdate</code> behavior is no option for me, because it is to time consuming. If there is another workaround to trigger the <code>conversationUpdate</code> in Teams please let me know.</p>