Microsoft Teams
This is a Pro feature
This page goes into detail how Scoold Pro integrates with Microsoft Teams. Scoold users can sign in with a Microsoft account, use bot commands to interact with Scoold and also get in-chat notification for mentions and new posts on Scoold. Scoold allows you to map spaces to teams or channels. By default, each team in MS Teams is mapped to a single Scoold space when people sign in with Microsoft.
The integration endpoint for Teams is /teams - this is where Scoold will accept and process requests from
MS Teams. To enable the Teams integration you first need to create a new bot for your app.
After creating the bot, take note of its ID and client secret and add those to your Scoold configuration file.
Then sideload (upload) the Scoold.zip app package in the ↗ Teams Developer Portal.
The app package can be downloaded from the Administration page after your bot has been created.
Also set scoold.ms_app_id and scoold.ms_secret as you normally would for an OAuth2 authentication with Microsoft.
Getting started
Section titled “Getting started”- Visit the ↗ Azure Poral > App registrations
page and create a new multitenant app registration called “Scoold” with the “Web” type selected under “Redirect URI”.
If you choose to create a single tenant app registration, you must specify your tenant ID and explicitly add the
following API permissions to your app registration:
ChannelMessage.Read.AllChannel.ReadBasic.AllUser.ReadBasic.AllGroup.Read.Alloffline_accessprofileemailopenid
- In the “Certificates and Secrets” tab, create a new client secret and take note of the secret key.
Then go to the “Overview” tab and take note of the “Application (client) ID”.
Add those three values to your Scoold configuration:
scoold-application.conf scoold.ms_app_id = "{Client ID}"scoold.ms_secret = "{Client Secret}"scoold.ms_tenant_id = "{Tenant (client) ID}" - Visit the ↗ Teams Developer Portal > Tools > Bot management page and create a new Bot.
Name the bot “Scoold” and take a note of the bot’s ID and secret key.
Configure the Bot endpoint address to be the URL of your Scoold Pro server, for example https://demo.cloud.scoold.com/teamsand click “Save”. - Copy the Bot ID and secret to your Scoold configuration file and restart Scoold:
scoold-application.conf scoold.teams.bot_id = "{Bot ID}"scoold.teams.bot_secret = "{Bot Secret}" - Visit the Administration page in Scoold and click the “Add to Microsoft Teams”
button. You will then be able to select the Teams channel where you would like
Scoold to send notifications. Add a notification webhook for each of the channels
you want. Up to 10 channels can be configured for notifications in this way.
- On the same page, click the Download app package button.
Download the Zip file and sideload it in ↗ Teams Admin Center > Apps > Upload a custom app
and select the
Scoold.zippackage. Repeat this step for every team where you want to receive notifications from Scoold. - Scoold should now be available in your Teams chat as a custom application. Optionally, if you want the app to be installed org-wide, click “Upload a custom app > Upload for my org”. This will add the app to your organization’s app catalog. After approving the app in the Teams Admin Center, you will then be able to install it as a Teams app for any of your teams.
Configuration properties
Section titled “Configuration properties”Here are all configuration properties for MS Teams:
# Microsoft OAuth2 client idscoold.ms_app_id = ""# Microsoft OAuth2 secretscoold.ms_secret = ""
scoold.teams.bot_id = ""scoold.teams.bot_secret = ""scoold.teams.map_workspaces_to_spaces = truescoold.teams.map_channels_to_spaces = falsescoold.teams.post_to_space = "workspace|scooldspace:myspace|default"
scoold.teams.notify_on_new_question = truescoold.teams.notify_on_new_answer = truescoold.teams.notify_on_new_comment = truescoold.teams.dm_on_new_comment = falsescoold.teams.default_question_tags = "via-teams"You can type @Scoold help to get a list of all supported actions. All the other bot commands and notifications work
just like with Slack and Mattermost, described above. A bot registration is required for the Teams integration
and it has to be created manually from the ↗ Teams Developer Portal.
When scoold.teams.dm_on_new_comment is enabled, Scoold will send a direct message notification to the author of
the post on which somebody commented. By default, DMs are turned off and the notification is sent to the channel instead.
If you wish to hide the Microsoft login button “Continue with Microsoft”, you can do it by adding this to your configuration:
scoold.teams.auth_enabled = falseIn-chat notifications
Section titled “In-chat notifications”Scoold will notify the channels where you have it installed, whenever a new question or answer is created, and also
whenever a user is mentioned. To install the application on multiple channels go to the Administration page and click
one of the “Add to Teams” buttons for each channel where you wish to get notifications. You can receive
notification on up to 10 channels simultaneously. Notifications for new posts will go to the channel associated with the
space in which the post was created. For example, when using Slack, if scoold.slack.map_workspaces_to_spaces is true,
and a question is created in space “Team1 #general”, Scoold will search for webhook registrations matching that
team/channel combination and only send a notification there. Direct message webhooks will be used only if there’s no
space-matching channel found.
Approving new posts from chat
Section titled “Approving new posts from chat”To enable this feature add this to your configuration:
scoold.posts_need_approval = trueWhen a new question or answer is created by a user with less reputation than the threshold, a notification message will be sent to Slack/Mattermost/Teams, giving you the option to either approve or delete that post. The action can only be performed by moderators.