MS Teams Bot

General description

MS Teams Bot is a component responsible for providing bridge between Microsoft Teams and SentiOne Automate. It allows to conduct conversations with Automate bots using MS Teams Direct Messages.

API

Default port: 5770

There are default endpoints for monitoring purposes. They are described in Components monitoring section.

Databases

This application connects to RabbitMQ in order to persist all incoming messages and to guarantee they will be processed even in case of temporary downtime of application.

Communication

This service communicates with the following services:

ApplicationConfig to URLAuth
Microsoft GraphNot configurableAccess token
gatewaychatbots.gateway-api.urlNone

Config

Application's config

chatbots.ms-teams-bot {
  # Private key from asymmetric RSA pair of keys
  private-key: ""
  # The url where the application is available publicly
  public-url: "http://ms-teams-bot:5770"
		
  # Config for GraphClient used to communicate with Microsoft's Graph
  graph-client: {
  	# From Azure's App 
  	tenant-id: ""
  	client-id: ""
  	client-secret: ""
  	# Public key from asymmetric RSA pair of keys
  	certificate: ""
	}
	# List of bots
  bots: [
    {
      # Automate's Project id  
      "bot-id": ""
      # Azure's bot ID retrieved from DB after successfull OAuth 
      "resource-id": ""
      # Tokens retrieved from DB after successfull OAuth 
      "access-token": ""
      "refresh-token": ""
    }
  ]
}
# Enable to allow MsTeams OAuth in Admin's channels section      
chatbots.admin.ms-teams-auth-enabled: true

Other required configurations:

# Actual address for gateway service  
chatbots.gateway-api.url: "<http://host:port>" 

chatbots.messaging {  
  rabbit {  
    hosts: ["HOST:PORT"]  
    username: "USER"  
    password: "PASSWORD"  
  }  
}

Job execution

None

Troubleshooting

Nothing yet.

Additional resources

Microsoft Graph subscription

We utilize subscriptions mechanism to receive messages sent to bot on MsTeams as a notification sent via webhook. You can read more about setting and receiving subscriptions here https://learn.microsoft.com/en-us/graph/webhooks-with-resource-data.