<p>For anyone who is wondering about the same for c#, here is the solution that worked for me:</p>
<pre><code class="lang-auto"> var channelData = context.Activity.GetChannelData<TeamsChannelData>();
var message = Activity.CreateMessageActivity();
message.Text = "Hello World";
var conversationParameters = new ConversationParameters
{
IsGroup = true,
ChannelData = new TeamsChannelData
{
Channel = new ChannelInfo(channelData.Channel.Id),
},
Activity = (Activity) message
};
var connectorClient = new ConnectorClient(new Uri(activity.ServiceUrl));
var response = await
connectorClient.Conversations.CreateConversationAsync(conversationParameters);
</code></pre>
<p>Note: If you are calling this outside Bot’s controller code then you need to call TrustServiceUrl on serviceUrl as shown here:</p>
<pre><code class="lang-auto"> MicrosoftAppCredentials.TrustServiceUrl(serviceUrl, DateTime.MaxValue);
var connectorClient = new ConnectorClient(new Uri(serviceUrl));
</code></pre>
<p>Source of answer: <a href="https://github.com/OfficeDev/BotBuilder-MicrosoftTeams/issues/162">https://github.com/OfficeDev/BotBuilder-MicrosoftTeams/issues/162</a></p>