Sending messages to the bot in Teams in automation pipeline
Description:
Our organization created a bot in MS Teams, and I need to load test it by sending messages to the bot. So, I need to develop a software application that can send automated messages to the bot in Teams.
Firstly, I used my personal access token to send messages to the bot using POST
https://graph.microsoft.com/v1.0/chats/{chat_id}/messages
endpoint, and the endpoint worked. But this option is not sufficient for automation, as in Delegated API, there is a need for user interaction (entering credentials) to obtain an access token, which is not possible in the automation pipeline.
I have also created an application with client_id and client_secret so that the application and not the user will send such requests. However, the Application API does not support the "Send message in a chat" endpoint.
In terms of a semi-automated pipeline with the user providing access to get an access token, there is an obstacle that one user can only have one chat with a bot; therefore, it is not sufficient for load testing.
Therefore, my questions are:
- Are there any endpoints missed that can enable sending chat messages to the bot in the automated pipeline?
- Is there a straightforward solution to do it by several users simultaneously?
- Is there some general advice on the approach to perform such load testing?