MS BOT Framework bots not working on Microsoft teams channel. Its working fine on every other channel configured.
App ID: b3e237eb-7a3b-4b15-b8e1-4c30d1c94c77
code used:
[BotAuthentication]
public class MessagesController : ApiController
{
/// <summary>
/// POST: api/Messages
/// Receive a message from a user and reply to it
/// </summary>
public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
{
if (activity.Type == ActivityTypes.Message)
{
ConnectorClient connector = new ConnectorClient(new Uri(activity.ServiceUrl));
if(activity.Text.ToUpper().Contains("EMAILS") || activity.Text.ToUpper().Contains("EMAIL") ||
activity.Text.ToUpper().Contains("MAILBOX") || activity.Text.ToUpper().Contains("OUTLOOK") )
{
// return our reply to the user
Activity reply = activity.CreateReply($"blah .. blah ..");
await connector.Conversations.ReplyToActivityAsync(reply);
reply = activity.CreateReply($"blah .. blah ..");
await connector.Conversations.ReplyToActivityAsync(reply);
reply = activity.CreateReply($"blah .. blah ..");
await connector.Conversations.ReplyToActivityAsync(reply); }
}
}
else
{
HandleSystemMessage(activity);
}
var response = Request.CreateResponse(HttpStatusCode.OK);
return response;
}
}
Hello: I was able to add and test your bot to my Teams client. Per your sample, I entered "Mail" and got a response. Are you still seeing issues on your side?