Installation of the KanBo Teams App

Table of Contents

This post is also available in: Deutsch

Create an Azure Bot

Visit this link to create an Azure Bot: https://portal.azure.com/#create/Microsoft.AzureBot

  • Choose a name for Your Bot Handle
  • Select Your subscription and the resource group Your KanBo is in
  • Select the regional data residency and the region Your KanBo is in
  • Change the pricing tier to free
  • Leave the rest of the options unchanged (Multi Tenant, Create new Microsoft App ID)

After doing all of the above click on Review + create and on “create” afterwards.

After creation is complete, go to the Azure Bot and into Settings > Channels

Click on “Microsoft Teams”

Accept the Terms of Service. Afterwards, leave “Microsoft Teams Commercial” selected and click on “Apply” on the bottom.

After that, go to “Configuration”

Fill the messaging endpoint with the URL of Your KanBo (https:// included) preceded by /plugins/teams-app/bot and click on apply.

After that, click on “Manage Password” next to the “Microsoft App ID” field

Remove the automatically created client secret and generate a new one by clicking on “New client secret”. We recommend generating the new one for 24 months and naming it “KanBo” for clarity.

Copy the client secret and save it somewhere.

Next, head to “Overview”

Copy the Application (client) ID and the Directory (tenant) ID for later use.

Lastly, click on “Add a Redirect URI”

Click on “Add a platform” and select “Web”

Paste “https://token.botframework.com/.auth/web/redirect” into the Redirect URI and select “Access tokens” and “ID tokens” and click “Configure”.

Grant permissions in Microsoft Entra

Go to App registrations – Microsoft Entra admin center and find the app registration of Your KanBo App and open it, after which, go to “API permissions”.

You can add permissions by clicking the “Add a permission” button, the clicking on “Microsoft Graph”

You have an option to choose between delegated permissions and applications permissions

The registration should have these permissions:

List of Delegated permissions:

  • TeamsActivity.Send

List of Application permissions:

  • AppCatalog.Read.All
  • TeamsAppInstallation.ReadWriteForUser.All
  • ChannelMessage.Read.All

After adding all required permissions, click on “Grant admin consent for KanBo”

Configuring KanBo App Settings

Go to Your KanBo appsettings.json and make sure these lines are present:

{
  "type": "teams-app.selfhosted",
  "children": [
    {
      "type": "env",
      "children": [
        {
          "type": "source",
          "content-path": "PATH-HERE"
        },
        {
          "type": "teams-app",
          "app-name": "KanBo.TeamsApp",
		  "bot-app-id": "CLIENT ID",
		  "bot-app-secret": "CLIENT SECRET",
		  "bot-app-tenant-id": "TENANT ID",
		  "bot-app-type": "MultiTenant",
		  "bot-kanbo-connection": "kanbo-connection"
        }
      ]
    }
  ]
},

Your KanBo folder should contain a folder called “KanBo.TeamsAppPlugin”. Copy the path to it and change the PATH-HERE in the code to the path to this folder.

Remember, that the path should either have forward slashes, or double backwards slashes

Client ID, Client Secret and the Tenant ID are values You’ve copied during the creation of and configuration of the Azure Bot.

After that is done, save the appsettings.json and restart Your KanBo App

Teams App setup

After Your KanBo has restarted, go to https://yourkanbourl/plugins/teams-app/setup

You should be presented by a page like this:

After You click on the “Expose an API” link, add a new Application ID Uri

After that, add a New Scope and fill it with the information from the setup page like this:

Now, we add the authorized client applications from the setup page

Now go back to the setup page and refresh the page.

If all the previous steps were done correctly, You should be presented with this after refreshing the setup page:

Clicking on “this” will start a direct download of a “KanBo.zip” file. Download it and head to Microsoft Teams admin center

There, click on Teams apps > Manage apps > Actions > Upload new app

And then, upload Your app:

Now You can start using Your KanBo App in Teams!