Microsoft Teams Integration


Overview of the integration

Microsoft Teams integration enables you to add a Service Bots virtual agent to Microsoft Teams. Users and corporate employees will both be able to communicate with this virtual agent.

This is performed via different products.

  • Azure Bot Service: Microsoft Azure service specially designed for developing bots using Bot apps and connecting them to different channels to make them available to solutions such as the MS Teams platform.
  • Microsoft Teams: A collaborative platform that enables discussions among users or teams within a given company. These discussions can also be with a bot, and in particular with the Service Bots virtual agent.
  • Service Bots: Used to associate a Service Bots virtual agent with an Azure Bot app and to connect this app to the MS Teams channel. The virtual agent will then be available in the MS Teams app and users can communicate with it.

Notes

  • The avatar of the Service Bots virtual agent in MS Teams has a hexagonal shape that is easily identifiable.

         Teams avatar.png

  • If users belong to a team where the Azure Bot app is installed, they can search for the virtual agent by entering its name in the search field at the top of the MS Teams window. Otherwise, they can search for the virtual agent in the MS Teams app catalog and run the Bot app.
  • Depending on the scope of the Bot app, the virtual agent may be mentioned in a team discussion using the @shortname instruction.

Step-by-Step Integration Process

You can integrate a Service Bots virtual agent with Microsoft Teams in four easy steps:


Step 1: In Azure Bot Service, create a Bot app.

Prerequisites: The Service Bots virtual agent must be created.
         Open url.png See the procedure.

1. Create a new Bot app.

  • Log in to the Microsoft Azure portal.
  • Open the left menu pane and select All services > AI + Machine Learning.
  • Click Bot Services in the right pane.
  • Click Add.
  • Select the Bot Channels Registration option.
  • Click Create.

The pane for creating the new Bot app will appear.
         Azure - Create bot app - Bot informations.png


2. Specify the information required for the new Bot app.

Bot handle: Unique ID or technical name of the new Bot app. Note: You cannot modify this field.
         example  ezvsample

Best Practice icon.png  You will be asked for this ID when you associate the Bot app with the Service Bots virtual agent in step 2. You should copy and paste it in your text editor in order to store it temporarily.

Subscription: Name of your subscription to the Azure service.

Resource group: Resource group associated with the Azure solution.

  • You must create a new one using the Create new link.

Location: Target region.

Pricing tier: Pricing tier of your subscription to the Azure service.

  • F0: Free-of-charge usage.
  • S1: Usage with an SLA.

Messaging endpoint: The URL of the Service Bots messaging endpoint, defined as indicated below. Replace the values within curly brackets { } by your own data.

  • {Domain}: Domain of the virtual agent created in Service Bots.
  • {BotHandle}: Name of the virtual agent created in Service Bots.
https:~/~/{Domain}/selfhelp/api/servicebots/msteams-agents/{BotHandle}

Application insights: Used to indicate if the Azure Analytics  statistics management service should be enabled (On option) or not (Off option). If the service is enabled, you should also specify a region.


3. Specify the ID of your new Bot app.

Generating the app ID

  • Select Auto create App ID and password (1) > Create New (2).
    A new pane will open with each action performed.
             Azure - Create bot app - ID informations.png
  • Click Create App ID in the App Registration Portal (3).
    A new tab will appear.
  • Click New registration.
    The window for registering an app will appear.
             Azure - Create bot app - Register informations.png
  • Specify the required information.
    • Name: Name of your Bot app that will be seen by app users.
    • Supported account types: Select the option called Accounts in any organizational directory.
  • Click Register.
    • An ID will be assigned to your new Bot app.
    • The window for registering the app will close.

Specifying the ID in the new Bot app

  • Copy the app ID.
             Azure - Create bot app - ID copy.png

Best Practice icon.png  You will be asked for this ID when you associate the Bot app with the Service Bots virtual agent in step 2. You should copy and paste it in your text editor in order to store it temporarily.

  • Return to the window for creating your new Bot app.
  • Paste the app ID in the Microsoft App ID field.
             Azure - Create bot app - ID paste.png


4. Enter the client secret of your new Bot app.

Generating the client secret

  • Select Certificates & secrets > New client secret.
             Azure - Create bot app - Secret new.png

The window for creating a client secret will appear.
         Azure - Create bot app - Secret add.png

  • Enter the description of the new client secret.
  • Click Add.
    • The client secret for your new Bot app will be generated.
    • The window for creating the client secret will close.

Specifying the client secret in the new Bot app

  • Copy the client secret displayed in the Value field.
             Azure - Create bot app - Secret copy.png

Best Practice icon.png  You will be asked for this client secret when you associate the Bot app with the Service Bots virtual agent in step 2. You should copy and paste it in your text editor in order to store it temporarily.

  •  Return to the window for creating the new Bot app.
  • Paste the client secret in the Password field.
             Azure - Create bot app - Secret paste.png

5. Complete the creation of your new Bot app.

  • Click OK and click Create in the window for creating the new Bot app.
    Your new Bot app will be registered with Azure Bot Service.
  • Return to the Bot Services page.
  • Click Refresh.
    Your new Bot app will appear in the list of specific bot apps.


Step 2: In Self Help, create a Service Bots virtual agent dedicated to the MS Teams channel.

1. Open the Self Help Administration module.

  • Go to the Self Help Home page.
  • Click Editor Portal.
  • Click Admin.
  • Enter your login and password.
  • Click Log in.

         Self Help - Opening Administration module.png

The Administration module will appear.

         Self Help - Opening virtual agent list.png

2. Select Administration > Service Bots > Agents in the menu to display the list of virtual agents.

3. Select your virtual agent.

         Self Help - Selecting bot.png

4. Associate the virtual agent with the Azure Bot app.

  • Click Associate MS-Teams bot.
  • Specify the information required for the new Bot app.
    • App ID: Value in the Microsoft App ID field that was generated when you created the new Bot app in Microsoft Azure. Open url.png See step 1.3.
    • App Password: Value in the Password field that was generated when you created the new Bot app in Microsoft Azure. Open url.png See step 1.4.
    • Bot Handle: Unique ID of the bot specified when you created the new Bot app in Microsoft Azure. Open url.png See step 1.2.

Best Practice icon.png  To avoid errors, you should copy the values you stored in your text editor in step 1 and paste them in the relevant fields.

         Self Help - Association informations.png

  • Click Associate.
    The virtual agent will be associated with MS Teams via the Bot app.
  • Click the name of the virtual agent and check that the details of the Bot app are correctly specified in the Bot Teams section.
    The window displaying the virtual agent's details will appear.
             Azure - Self Help link - Virtual agent detail.png


Step 3: In MS Teams, test the Service Bots virtual agent dedicated to MS Teams.

1. Test the interaction of the Service Bots virtual agent in the Web Chat channel.

  • Go to the Azure portal.
  • Select your Bot app.
  • Click Test in Web Chat.
    A conversation panel will appear to the right.
             Azure - Web app chat channel.png
  • Check that the Bot app is able to interact correctly by typing various messages in the conversation panel.
     

2. Test the interaction of the Service Bots virtual agent in the Microsoft Teams channel.

  • Add the MS Teams channel to the list of channels.
    • Select Channels > Teams icon.png.
               Integrate bot in Teams - Activation.png
       
    • Click Save.
  • Display the new MS Teams channel.
    • Return to the overview of Channels.
    • Click the Microsoft Teams channel Teams icon.png.
               Integrate bot in Teams - Discussion setup.png
  • Check that your virtual agent is able to interact correctly by initiating a team conversation.
             Integrate bot in Teams - Discussion example.png


Step 4: In MS Teams, deploy the Azure Bot app.

1. Run MS Teams.

2. Open App Studio.

  • Click Apps in the side pane.
  • Type App Studio in the search field.
  • Select the app in the right pane and click Open.
    Note: Click Install if this is the first time you are using this tool.

         Deploy bot in Teams - App studio opening.png

3. Create a new Teams app associated with the Azure Bot app in the manifest editor.

  • Select the Manifest editor tab.
  • Click Create a new app.

         Deploy bot in Teams - App studio - Manifest tab.png

The three steps for creating the new Teams app are displayed.
         Deploy bot in Teams - App studio - Manifest tab steps.png

4. Define the general information for your new Teams app in the (1) Details step.

  • Select Details > App details in the left menu pane.

         Deploy bot in Teams - App studio - Manifest tab - step Details.png

  • Specify the information required for the new Teams app.
  • App names:
    • Short name: Name of the Teams app displayed in the MS Teams search. This is similar to the name of an employee.
    • Long name: Text displayed after the name. This is similar to the job title for an employee.
  • Identification:
    • App ID: Unique ID of the Teams app. Click Generate to create it.
    • Package Name: Technical name of the app.
    • Version: App version number.
  • Descriptions: Long and short descriptions of the Teams app. This will be displayed in the app catalog.
  • Developer information:
    • Name: Name of the Teams app developer.
    • Website: URL of the website associated with the Teams app. Note: URLs must use the SSL protocol.
  • Partner information (optional):
    • MPN ID: ID of the partner in the Microsoft Partner Network.
  • App URLs: URL of pages displaying the privacy statement and terms of service. Note: URLs must use the SSL protocol.
  • Branding: Visual identity of the new Teams app defined using a color icon, a transparent outline and a background color. Click Update to download the files. Note: Files must be in PNG format.

5. Define the capabilities of the Azure bot in the new Teams app in the (2) Capabilities step.

Integrating the portal in a Teams conversation tab (optional)

  • Select Capabilities > Tabs in the left menu pane.
  • Select Add a personal tab > Add.

         Deploy bot in Teams - App studio - Manifest tab - step Capabilities Tabs.png

The window for configuring the tab will appear.
         Deploy bot in Teams - App studio - Manifest tab - step Capabilities Tabs details.png

  • Specify the information required for the new tab.
  • Name: Name of the tab in the Teams conversation.
  • Entity ID: Unique ID of the tab.
  • Content URL:
  • Website URL: URL of your portal.
  • Click Save.
     

Defining the capabilities of the Azure bot

  • Select Capabilities > Bots in the left menu pane.

         Deploy bot in Teams - App studio - Manifest tab - step Capabilities Bots.png

  • Click Set up.
    The window for configuring the bot will appear.
  • Select the Existing bot tab.

         Deploy bot in Teams - App studio - Manifest tab - step Capabilities Bots set up.png

  • Bot ID: Specify the ID of the Azure bot that was generated in step 1.6.
    • Select the Connect to a different bot id option.
    • Paste the ID of the Azure Bot app in the field displayed.
  • Scope: Select the relevant options to define the scope of the bot.
    • Personal: This enables users to have a direct conversation with the virtual agent.
    • Team: In team channels where the Teams app is installed, this enables users to mention and communicate with the virtual agent using the @shortname instruction.
    • Group Chat: In a conversation with several participants, this enables users to mention and communicate with the virtual agent using the @shortname instruction.
  • Click Save.
     

6. Define the domain of the Azure bot in the new Teams app in the (3) Finish step.

  • Select Finish > Test and distribute in the left menu pane.

         Deploy bot in Teams - App studio - Manifest tab - step Finish.png

  • Correct any configuration errors occurring in the (1) Details and (2) Capabilities steps. These errors will appear in the right pane.
     
  • Deploy the new Teams app in a team.
    • Click Install.
       
    • Click Add.
      • A conversation is initiated with the virtual agent.
      • The Teams app will be available in the list of apps.
      • All team members can communicate with the virtual agent using the @shortname instruction.
       
  • Add the new app to the list of Teams apps of your company.
    • Click Submit.
    • Use the checklist to ensure that you have specified all of the required information.
               Deploy bot in Teams - App studio - Manifest tab - step Finish Submit.png
       
    • Click Submit my app.
Tags:
Last modified by Unknown User on 2020/03/19 15:30
Created by Administrator XWiki on 2019/12/10 17:25

Shortcuts

Recent changes
•  Service Manager
•  Service Apps
•  Self Help

Glossary

Powered by XWiki ©, EasyVista 2020