This plugin integrates MS Teams with Mattermost by providing automated syncing of messages from Mattermost to MS Teams and vice versa. For a stable production release, please download the latest version from the Plugin Marketplace and follow the instructions to install and configure the plugin. If you are a developer who wants to work on this plugin, visit the Development section on this page
See the Mattermost Product Documentation for details on installing, configuring, enabling, and using this Mattermost integration.
This plugin supports the following features:
-
Connect to MS Teams account using the OAuth2 flow.
-
Link Mattermost channels with MS Teams channels and sync messages between the linked channels.
-
Link Mattermost DMs and group messages with Teams chats and sync messages.
-
Sync Mattermost and MS Teams messages for any changes made in any existing messages on either side.
-
Deletion of MS Teams messages is synced with Mattermost but it's not vice versa.
-
Sync posts containing markdown and attachments.
-
Sync reactions on posts.
This repository is licensed under the Mattermost Source Available License and requires a valid Enterprise Edition License when used for production. See frequently asked questions to learn more.
Although a valid Mattermost Enterprise Edition License is required if using this plugin in production, the Mattermost Source Available License allows you to compile and test this plugin in development and testing environments without a Mattermost Enterprise Edition License. As such, we welcome community contributions to this plugin.
If you're running an Enterprise Edition of Mattermost and don't already have a valid license, you can obtain a trial license from System Console > Edition and License. If you're running the Team Edition of Mattermost, including when you run the server directly from source, you may instead configure your server to enable both testing (ServiceSettings.EnableTesting
) and developer mode (ServiceSettings.EnableDeveloper
). These settings are not recommended in production environments.
Make sure you have the following components installed:
-
Go - v1.18 - Getting Started
Note: If you have installed Go to a custom location, make sure the
$GOROOT
variable is set properly. Refer Installing to a custom location. -
Make
You also want to have the environment variable MM_SERVICESETTINGS_ENABLEDEVELOPER="true"
set if you are not working on linux. Without this, the plugin will be built excusively for linux.
In your mattermost config, make sure that PluginSettings.EnableUploads
is true
, and FileSettings.MaxFileSize
is large enough to accept the plugin bundle (eg 256000000
)
Run the following command in the plugin repo to prepare a compiled, distributable plugin zip:
make dist
After a successful build, a .tar.gz
file in the /dist
folder will be created which can be uploaded to Mattermost. To avoid having to manually install your plugin, deploy your plugin using one of the following options.
If your Mattermost server is running locally, you can enable local mode to streamline deploying your plugin. Edit your server configuration as follows:
{
"ServiceSettings": {
...
"EnableLocalMode": true,
"LocalModeSocketLocation": "/var/tmp/mattermost_local.socket"
}
}
and then deploy your plugin:
make deploy
You may also customize the Unix socket path:
export MM_LOCALSOCKETPATH=/var/tmp/alternate_local.socket
make deploy
If developing a plugin with a web app, watch for changes and deploy those automatically:
export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_TOKEN=j44acwd8obn78cdcx7koid4jkr
make watch
Alternatively, you can authenticate with the server's API with credentials:
export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_USERNAME=admin
export MM_ADMIN_PASSWORD=password
make deploy
or with a personal access token:
export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_TOKEN=j44acwd8obn78cdcx7koid4jkr
make deploy