We use Microsoft bot
framework and have a requirement of sending a message to a bot connected to Microsoft Teams channel from an external application(running in a different environment, e.g on-premise) via REST API. The following REST API helps to create conversation
- API : https://smba.trafficmanager.net/amer/v3/conversations
- Authorization: Bearer Token (token endpoint used: https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token)
- POST Request Body is here:
{
"bot": {
"name": "someBot",
"id": "xxx-some-bot-id"
},
"members": [
{
"name": "some user",
"id": "xxx-some-user-id"
}
],
"channelData": {
"tenant": {
"id": "xxx-some-teanant-id"
}
},
}
The id returned by this API can be later used for sending messages via /v3/conversations/{id}
A couple of questions here:
Is there any REST API available to get the member Id(user id) and bot id used in the above payload? In other words, how does an external application can read these two internal Ids for use while making API call? Could not find an appropriate API in the Bot API doc page: Bot Framework REST API
Is there a way to get the tenant id via REST API as well for the above case? (I understand it can be read from Teams Application URL)
Thanks