<p>The best approach to achieve your goal at this point is to create a Bot and implement it to expose a webhook endpoint which your app or service can post to and for the bot to post those messages into chat with the user.</p>
<p>Start by capturing the information required to successfully post to a conversation of a bot with user based on the incoming activity received by your bot.</p>
<pre><code class="lang-auto">var callBackInfo = new CallbackInfo()
{
ConversationId = activity.Conversation.Id,
ServiceUrl = activity.ServiceUrl
};
</code></pre>
<p>Then pack the callBackInfo into a token that would later be used as a parameter to your webhook.</p>
<pre><code class="lang-auto"> var token = Convert.ToBase64String(
Encoding.Default.GetBytes(
JsonConvert.SerializeObject(callBackInfo)));
var webhookUrl = host + "/v1/hook/" + token;
</code></pre>
<p>Finally, implement the webhook handler to unpack the callBackInfo:</p>
<pre><code class="lang-auto">var jsonString = Encoding.Default.GetString(Convert.FromBase64String(token));
var callbackInfo = JsonConvert.DeserializeObject<CallbackInfo>(jsonString);
</code></pre>
<p>And post to the conversation of the bot with the user:</p>
<pre><code class="lang-auto">ConnectorClient connector = new ConnectorClient(new Uri(callbackInfo.ServiceUrl));
var newMessage = Activity.CreateMessageActivity();
newMessage.Type = ActivityTypes.Message;
newMessage.Conversation = new ConversationAccount(id: callbackInfo.ConversationId);
newMessage.TextFormat = "xml";
newMessage.Text = message.Text;
await connector.Conversations.SendToConversationAsync(newMessage as Activity);
</code></pre>
<p>Take a look my blog post on this topic <a href="https://blog.somecreativity.com/2016/11/04/send-a-notification-to-a-microsoft-teams-user-from-an-app/">here</a>. If you have never written a Microsoft Teams bot before, take a look at my other blog post with step-by-step instructions <a href="https://blog.somecreativity.com/2016/11/03/creating-a-bot-for-microsoft-teams/">here</a>.</p>