A bot in Microsoft Teams is managed through the Bot Framework.
- Navigate to https://dev.botframework.com/bots/new.
- Fill in the blanks.
- Click on Create Microsoft App ID and password.
- Save the AppId and the Password, you will need it later.
Use a Dockerfile to create the bot instance. Create the bot scripts following the instructions documented at https://hubot.github.com/docs/.
To deploy the bot use the botframework adapter during the deployment.
Don't forget to specify the BOTBUILDER_APP_ID
and BOTBUILDER_APP_PASSWORD
environment variables.
To create the MS Teams application, package the MS Teams application in a zip file containing:
- a manifest.json file,
- icons referenced by the manifest.
{
"$schema": " https://developer.microsoft.com/en-us/json-schemas/teams/v1.3/MicrosoftTeams.schema.json",
"manifestVersion": "1.3",
"version": "1.0.1",
"id": "<ID provided by the MS App>",
"packageName": "com.dxc.hubot.doc",
"developer": {
"name": "",
"websiteUrl": "",
"privacyUrl": "",
"termsOfUseUrl": ""
},
"name": {
"short": "doc",
"full": "Doc"
},
"description": {
"short": "Handle operational tasks",
"full": "Handle operational tasks"
},
"icons": {
"outline": "icon.png",
"color": "icon-192x192.png"
},
"accentColor": "#525354",
"bots": [
{
"botId": "<ID provided by the MS App>",
"needsChannelSelector": false,
"isNotificationOnly": false,
"scopes": [
"team",
"personal",
"groupchat"
],
"supportsFiles": true
}
],
"permissions": [
"identity",
"messageTeamMembers"
]
}
In MS Teams:
- Select the team the bot is to be added to.
- Right click.
- Click on managed team.
- Click on the Applications tab.
- On the bottom right corner click on Load a custom application.
Refer to the following documentation https://github.com/jayongg/TeamsHubot to learn how to add the authorization scripts.