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:
- Creating Microsoft Teams bot app with Developer Portal
- Creating a bot for Microsoft Teams bot app
- 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.
- Find and add Developer Portal to your Microsoft Teams.
- Launch and log in your Microsoft Teams client.
- Click the Apps icon at the bottom left of your Microsoft Teams window to open the Apps panel.
Figure: Apps Panel - Use the search bar to search for Developer Portal.
Figure: Developer Portal - Select Developer Portal.
- Click Add.
Figure: Add Developer Portal
You can see the home page of Developer Portal.
- Create a new app.
- Click Apps at the top of the home page of Developer Portal.
Figure: Apps Panel - Click New app.
Figure: Create a new app - 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.
- Click Add.
Figure: App Name - 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
- In the Descriptions fields, specify a short description for your app.
- Click Apps at the top of the home page of Developer Portal.
- Configure your app.
- Switch to Apps panel and select the app that you created.
Figure: Select App - Navigate to Configure > App features.
- Select Bot.
Figure: App features Locate your bot in Identify your bot section.
In the bot settings, choose Personal, Team and Group Chat for Scope to enable your bot app for various types of chats.
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.
- Switch to Apps panel and select the app that you created.
- Publish your app.
- Navigate to Publish > App package.
Figure: App package - Click Download app package.
Figure: Download App package - Navigate to Apps. Click Manage your apps.
Figure: Manage Apps - Click Upload an app.
Figure: Upload App - 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 - Select Add to a team from the drop down menu.
Figure: Add to a team - Type or select a team to set up your bot.
Figure: Set up a bot
- Navigate to Publish > App package.
- Optional: You can also choose to publish your app to your organization's app catalog, so that it is shareable within your organization.
- Navigate to Apps > click Manager your apps.
Figure: Manage your Apps - 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.
- Navigate to Apps > click Manager your apps.
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.
- 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. - 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:
- Click Tools.
Figure: Tools panel - Click Bot management to create your bot.
Figure: Create bot - Click New bot.
Figure: New bot - Specify a name for your bot in the prompted dialog box. Click Add.
Figure: Add bot - Select your bot.
- 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 - 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:
- Create a new resource.
- Search for Azure bot in the search bar and select it.
Figure: Azure bot - Click Create to create a new resource.
Figure: Create Resource - Bot Channels - Specify the required values, where:
- Bot handler is a unique identifier for your bot. You can set it to be your bot name.
- 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.
- Messaging endpoint needs to be configured later. You can leave it blank for now.
- Microsoft App ID and password are mandatory fields. Set it as Auto create App ID and password. Otherwise, you can create one manually.
- Search for Azure bot in the search bar and select it.
- Configure the resource.
- Configure the channels.
- Go back to the resource page. Navigate to Settings > Channels. Now, only Web Chat is listed in the table.
- Navigate to Add a featured channel > click Microsoft Teams icon.
- Click Save.
- Set up the bot for your bot app in Microsoft Teams.
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,
- <messaging-endpoint.protocol>: the default value is https;
- <messaging-endpoint.hostName>: the host name is https://devdigitalagentwb.symphonysummit.com/;
- <messaging-endpoint.port>: default value;
- <messaging-endpoint.basePath>: the default value is http://api/v1/messaging/webhooks/.
- <messaging-endpoint.botId>: the value is digital-agent;
- Channel name: Teams.
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:
- Click Bot management.
- Choose the bot that you created and start editing your bot app.
Figure: Bot management
Figure: Select bot - Click Configure.
Figure: Configure messaging endpoint - 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:
- Launch the Microsoft Azure portal at portal.azure.com.
- Click All resources and select the bot that you created.
- Navigate to Settings > click Configuration.
- 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.
- Verify that the Enable Streaming Endpoint box is enabled.
- Click Apply.
Confluence Cloud Migration Alert: Please refer to known issues you may encounter in Confluence Cloud: https://eitdocs.atlassian.net/wiki/x/wDGwAQ