MS Teams App Setup

Integrate Digital Agent into Microsoft Teams channel by creating a bot app and a bot for Microsoft Teams and configuring the messaging endpoint.

To configure your Microsoft Teams for Digital Agent, perform the following steps:

  1. Creating Microsoft Teams bot app with Developer Portal
  2. Creating a bot for Microsoft Teams bot app
  3. Configuring messaging endpoint for Microsoft Teams

Creating Microsoft Teams bot app with Developer Portal

Use the Microsoft Teams Developer Portal to set up a bot app for Microsoft Teams by creating a new app, select bot capabilities, set up the bot, add to your Microsoft Teams workspace.

Perform the following steps to build a Microsoft Teams bot app via the Microsoft Teams Developer Portal.

  1. Find and add Developer Portal to your Microsoft Teams.
    1. Launch and log in your Microsoft Teams client.
    2. Click the Apps icon at the bottom left of your Microsoft Teams window to open the Apps panel.


      Figure: Apps Panel

    3. Use the search bar to search for Developer Portal.


      Figure: Developer Portal

    4. Select Developer Portal.
    5. Click Add.


      Figure: Add Developer Portal

      You can see the home page of Developer Portal.

  2. Create a new app.
    1. Click Apps at the top of the home page of Developer Portal.


      Figure: Apps Panel

    2. Click New app.


      Figure: Create a new app

    3. A dialog box prompts to specify a short name for your app that is used for configuration in Digital Agent as the bot username. Mention the name for the bot username.
    4. Click Add.


      Figure: App Name

    5. Specify the required values for your app, and click Save.


      Figure: New App Panel

      • In the Descriptions fields, specify a short description for your app.


        Figure: App Descriptions

      • Mention all the mandatory information accordingly.


        Figure: Dev information and App URLs

  3. Configure your app.

    1. Switch to Apps panel and select the app that you created.


      Figure: Select App

    2. Navigate to Configure > App features.
    3. Select Bot.


      Figure: App features

    4. Locate your bot in Identify your bot section.

    5. In the bot settings, choose Personal, Team and Group Chat for Scope to enable your bot app for various types of chats.

    6. Save your settings and you can see your bot in the Bots panel.

      Note

      You need to create a bot if you don't have one. You can either create a bot with Microsoft Bot Framework or with Microsoft Azure. For specific steps, see Creating a bot with Microsoft Bot Framework or Creating a bot with Microsoft Azure.


  4. Publish your app.
    1. Navigate to Publish > App package.


      Figure: App package

    2. Click Download app package.


      Figure: Download App package

    3. Navigate to Apps. Click Manage your apps.


      Figure: Manage Apps

    4. Click Upload an app.


      Figure: Upload App

    5. Select Upload a custom app to add the app to a team. Upload the app package that you downloaded in sub-step b.


      Figure: Upload custom App

    6. Select Add to a team from the drop down menu.


      Figure: Add to a team

    7. Type or select a team to set up your bot.


      Figure: Set up a bot

  5. Optional: You can also choose to publish your app to your organization's app catalog, so that it is shareable within your organization.

    1. Navigate to Apps > click Manager your apps.


      Figure: Manage your Apps

    2. Select Submit an app to your org to publish your app.


      Figure: Submit app

      Your app will appear on your Apps homepage after the IT admin of your organization approves.


      Figure: App Catalog

      Now, people in your tenant can see this app and can use it.

Creating a bot for Microsoft Teams bot app

Microsoft offers two ways to create a bot. Microsoft Azure or Microsoft Bot Framework are the two options. Select any one of them as per the requirement.

  1. Creating a bot with Microsoft Bot Framework
    You can create a Microsoft Bot Framework bot for your bot app using the Microsoft Developer Portal tool.

  2. Creating a bot with Microsoft Azure
    You can use Microsoft Azure portal to create a resource using the Bot Channels Registration service, configure the resource, obtain the bot password, and setup channels in order to create a bot with Microsoft Azure. 

Creating a bot with Microsoft Bot Framework

Use the Microsoft Developer Portal tool to create a bot with Microsoft Bot Framework. Then, set it up for your bot app.

To create a bot using Microsoft Bot Framework, perform the following steps:

  1. Click Tools.


    Figure: Tools panel

  2. Click Bot management to create your bot.


    Figure: Create bot

  3. Click New bot.


    Figure: New bot

  4. Specify a name for your bot in the prompted dialog box. Click Add.


    Figure: Add bot

  5. Select your bot.
  6. Navigate to Client secrets > click Add a client secret for your bot to generate a client secret for your bot.


    Figure: Generate new client secret

  7. Copy the new client secret.


    Figure: New client secret

Note

The client secret only appears once in this. Save the client secret for use in later steps. The client secret is required while configuring Microsoft Teams.

Creating a bot with Microsoft Azure

The Azure Bot resource service must be used to create a resource, configure the resource, obtain the bot password, and configure channels in order to create a bot with Microsoft Azure.

To create a bot with Microsoft Azure, perform the following steps:

  1. Create a new resource.
    1. Launch the Microsoft Azure portal at portal.azure.com.
    2. Navigate to Azure Services > click Create a resource.


      Figure: Create resource

    3. Search for Azure bot in the search bar and select it.


      Figure: Azure bot

    4. Click Create to create a new resource.


      Figure:  Create Resource - Bot Channels

    5. Specify the required values, where:

      1. Bot handler is a unique identifier for your bot. You can set it to be your bot name.
      2. Resource group is a container that holds related resources for an Azure solution. You can create a new one if you don't have one.
      3. Messaging endpoint needs to be configured later. You can leave it blank for now.
      4. Microsoft App ID and password are mandatory fields. Set it as Auto create App ID and password. Otherwise, you can create one manually.

    6. Click Create. It takes a while to complete the creating process. You can see a notice in the Notification at the upper right of the menu bar.


      Figure: Create bot with Azure

  2. Configure the resource.
    1. Click Go to resource when you see the notification. You can also check the resource from the portal home page. Click All resources to see the one you just created. Select it to start configuration.
    2. Navigate to Settings > Configuration.
    3. Specify the required values for your resource.

      1. Click the checkbox next to Enable Streaming Endpoint to enable it.
      2. Specify the messaging endpoint after installing Digital Agent.
      3. Click Apply.

    4. To get the bot password, click Manage next to Microsoft App ID. Open Certificates & secrets panel.

      1. Navigate to Client secrets > New client secret.
      2. Add a client secret displays.
      3. Specify the description for your resource.
      4. Set the Expires value for 24 months.
      5. Click Add.
        The resource details are displayed in the table with Description, Expires, Value, and ID. Your bot's Value is its password. When configuring Digital Agent, save it for later use, as it is displayed only once.

        Note

        The Microsoft App ID is the bot ID in the App Studio of Microsoft Teams. You will need it when you configure your Microsoft Teams in later steps.

  3. Configure the channels.
    1. Go back to the resource page. Navigate to Settings > Channels. Now, only Web Chat is listed in the table.
    2. Navigate to Add a featured channel > click Microsoft Teams icon.
    3. Click Save.

  4. Set up the bot for your bot app in Microsoft Teams.
    1. Open the App Studio tool in your Microsoft Teams client.
    2. Click your resource that is listed on the panel.
    3. Navigate to Capabilities > BotsEdit.


      Figure: Capabilities section

    4. Click Connect to a different bot id.
    5. Mention the Microsoft App ID that you have for your Azure bot.
    6. Select Team for Scope to add the bot app to your teams.
    7. Click Save.

Configuring messaging endpoint for Microsoft Teams

For Microsoft Teams to push messages to your Digital Agent, you must expose Digital Agent via a public HTTPS endpoint. The step-by-step process varies depending on how you create your bot.

If the IP address of Digital Agent server is public, you can use the Chatbot messaging-endpoint URL <https://devdigitalagentwb.symphonysummit.com/api/v1/messaging/webhooks/digital-agent/teams> directly. Otherwise, you must configure your own network firewall or use some proxy servers to make sure that your MS Teams can access the web hook of Digital Agent server from Internet.

Note

You can find the values for protocol, hostName, port, and basePath messaging-endpoint URL <https://devdigitalagentwb.symphonysummit.com/api/v1/messaging/webhooks/digital-agent/teams>. Where,

Configuring messaging endpoint for the Microsoft Bot Framework bot

If you are configuring your bot using the Microsoft Bot Framework, you'll need to configure the messaging endpoint in Developer Portal by entering the bot's endpoint address.

Configuring messaging endpoint for the Microsoft Azure bot

To complete the configuration, you must select the messaging endpoint in the Microsoft Azure portal after creating your bot using Microsoft Azure.

Configuring messaging endpoint for the Microsoft Bot Framework bot

Configure the messaging endpoint in Developer Portal by specifying the bot's endpoint address, if you are configuring your bot using the Microsoft Bot Framework.

To configure messaging endpoint for MS Bot Framework bot, perform the following steps:

  1. Launch and log in your Microsoft Teams client.
  2. Click Developer Portal and click Tools.


    Figure: Developer Portal

  3. Click Bot management.
  4. Choose the bot that you created and start editing your bot app.


    Figure: Bot management


    Figure: Select bot

  5. Click Configure.


    Figure: Configure messaging endpoint

  6. Specify the Bot endpoint address input box under Endpoint address with the Digital Agent web hook URL if it is publicly accessible. Otherwise, you must fill in with your public proxy URL that transmits network payload to Digital Agent web hook URL.


    Figure: Bot endpoint address

Configuring messaging endpoint for the Microsoft Azure bot

After creating your bot using Microsoft Azure, choose the messaging endpoint in the Microsoft Azure portal to finish the configuration.

To configure messaging endpoint for Microsoft Azure bot, perform the following steps:

    1. Launch the Microsoft Azure portal at portal.azure.com.
    2. Click All resources and select the bot that you created.
    3. Navigate to Settings > click Configuration.
    4. Specify the Messaging endpoint with the Digital Agent web hook URL if it is publicly accessible Otherwise, you must fill in with your public proxy URL that transmits network payload to Digital Agent web hook URL.
    5. Verify that the Enable Streaming Endpoint box is enabled.
    6. Click Apply.