Configuring Microsoft Teams
This document provides detailed instructions for configuring Microsoft Teams in channels-connector
Prerequisites
- Active Microsoft Azure account
- Azure Active Directory Tenant
- At least 1 user with Microsoft Teams license
Step 1: Create application
- Log in to Microsoft Azure Portal.
- Go to
Active Azure Directory -> App Registrations
and clickNew registrations
. - Create application with chosen Name and Supported account type.
Step 2: Configure application
- From
App registrations
section, choose newly created application. - Go to
API permissions
and add following permissions fromMicrosoft Graph -> Delegated permissions
:- Chat.ReadWrite
- offline_access
- user.read
- Go to
Certificates & secrets
and create new client secret.
- Save secret's Value for later use.
- Go to
Authentication
and add a platform Web with Redirect URIs composed of admin application domain and channels/oauth/msteams endpoint.
- Make sure that Automate application has following configuration property:
chatbots.admin.is-https: true
Step 3: Configure messages encryption
To secure connection from Microsoft Teams to channels-connector application, it is required to generate asymmetric key pair and use them in channels-connector configuration.
- Generate asymmetric key pair using OpenSSL in version 3.0+ by running following scripts on Linux machine.
- Private key
openssl genrsa -out private.key 2048 cat private.key | tail -n +2 | head -n -1 | tr -d \\n; echo
- Public key (certificate)
openssl req -new -x509 -key private.key -out publickey.cer cat publickey.cer | base64
Step 4: Fill configuration file
chatbots.channels-connector.ms-teams: {
enabled: true
private-key: "FROM STEP 3"
certificate: """FROM STEP 3"""
client-secret: "FROM STEP 2"
tenant-id: "FROM PREREQUISITES"
client-id: "FROM STEP 2"
}
Tenant ID
Client ID
Step 5: Redeploy channels-connector with new configuration
Step 6: Authenticate Microsoft Teams account
- Log in to Automate platform.
- Go to
Channels
and clickCreate -> Microsoft Teams
. - You will be redirected to Microsoft's login page.
- Log in using credentials of user which will be used as bot and confirm permissions.
- New Microsoft's Teams channel will appear on channels list.
Updated about 1 year ago