In an ASP.NET web applications using IWebHostBuilder, when you set app.UseTeams(routing:false) and create a new custom Controller to handle /api/messages, the custom controller is not invoked. Framework encounters following exception
The request matched multiple endpoints. Matches:
Microsoft.SREAgent.AuthenticationEndpoint.Controllers.CustomTeamsMessagesController.OnMessage (Microsoft.SREAgent.AuthenticationEndpoint)
Microsoft.Teams.Plugins.AspNetCore.Controllers.MessageController.OnMessage (Microsoft.Teams.Plugins.AspNetCore)
where CustomTeamsMessagesController is the new custom controller added to handle /api/messages in the project