Microsoft Teams Integration


Caution: Use the Teams developer portal to deploy your Azure Bot app in MS Teams. Microsoft has announced that it will stop the access to the App Studio tool as of December 31, 2021.

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.
         Integrate bot in Teams - Discussion example.png

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 steps:

Prerequisites


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

1. Create a new Bot app.

  • Click More services at the left of the service list.
  • Click All services > AI + Machine Learning in the left menu pane, then click Bot Services in the right pane.
  • Click + Create in the toolbar.
    The list of available bots will be displayed.
  • Click the See more link at the bottom of the page and select Azure Bot service.
  • Click Create.
             Azure - Create bot app - Azure Bot.png
    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.

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

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

Microsoft App ID: Select the Create new Microsoft App ID option.

3. Finish the creation of your new Bot app.

  • Click Rewiew + Create.
    Information will be rewieved.
  • Correct any configuration errors.
  • Click Create.
    • The summary of information will be displayed.
      Azure - Create bot app - Bot informations - Deployment complete.png
    • The ID and the password (secret) of the Bot app will be generated.
    • The Bot bot will be deployed on the Azure portal.

4. Specify the Service Bots endpoint.

  • Click Go to resource.
  • Click Configuration in the left menu pane.
  • Specify the Messagerie endpoint field as indicated below. Replace the values indicated in yellow by your own data.
             Azure - Create bot app - Bot informations - Messaging endpoint.png

https://{Domain}/selfhelp/api/servicebots/msteams-agents/{BotHandle}

  • {Domain}: Domain of the virtual agent created in Service Bots.
  • {BotHandle}: Name of the virtual agent created in Service Bots.
  • Click Apply.


5. Retrieve the ID and the secret (password) of your new Bot app.

Retrieving the app ID

  • Copy the app ID in the Microsoft App ID field.
             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.

 

Generating and retrieving the client secret

Note: You cannot copy the client secret which has been automatically generated at the creation of the new Bot app. You should create a new one.

  • Click Manage next to the Microsoft App ID field.
             Azure - Create bot app - Secret manage.png

The certificate and client secret list will be displayed.
         Azure - Create bot app - Secret display.png

  • Click + New client secret at the top of the Client secrets section.

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

  • Enter the description of the new client secret and its expiration date.
  • Click Add.
    • The client secret for your new Bot app will be generated.
    • The window for creating the client secret will close.
    • The new secret will appear in the client secret list. 
  • Copy the 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.


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

1. Open the Online Studio.

2. Select Service Bots > Agents in the menu.
The list of virtual agents will appear.

3. Select the virtual agent you want to associate to the Azure Bot app, then click Associate MS-Teams bot.

         Self Help - Selecting bot.png

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

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

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.5.

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.5.

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.

5. Click Associate.

  • The virtual agent will be associated with MS Teams via the Bot app.
  • The details of the Bot app will appear in the the virtual agent's details window (Click the virtual agent name to display the window).
    Azure - Self Help link - Virtual agent detail.png


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

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
       
    • Accept the use conditions then 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
      A conversation will open in Teams online or in the Teams app.
  • 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.

    Open url.png See the old version Deployment using the App Studio tool. Caution: Microsoft has announced that it will stop the access to the App Studio tool as of December 31, 2021.

1. Create a Teams app associated with your new Bot app.

  • Click Apps in the side pane.
    The Teams app list will be displayed.
             Deploy bot in Teams - Apps list.png
  • Click + New app in the toolbar.
    The window for creating the new Teams app will appear.
             Deploy bot in Teams - App information.png
  • Specify the name of the new Teams app.
  • Click Add.
     

2. Configure your new Teams app.

Definition of the general information in the Basic information section

  • Specify the information of the new Teams app.
             Deploy bot in Teams - App configuration - Basic information.png

App names:

  • Short name: Name of the Teams app displayed in the MS Teams search. This is similar to the name of an employee.
  • Full name: Text displayed after the name. This is similar to the job title for an employee.

App ID: Unique ID of the Teams app. It is automatically generated.

Descriptions: Long and short descriptions of the Teams app. This will be displayed in the app catalog.

Version: App version number.

Developer information:

  • Developer or company name: Name of the Teams app developer.
  • Website: URL of the website associated with the Teams app. Note: URLs must use the SSL protocol.

App URLs: URL of pages displaying the privacy statement and terms of service. Note: URLs must use the SSL protocol.

Application (client) ID: Specify the ID of the Azure Bot app that was generated in step 1.4.

Microsoft Partner Network ID (optional): ID of the partner in the Microsoft Partner Network.

Best Practice icon.png  Type the 5377006 ID to identify your new Teams app to Microsoft as a new EasyVista app. It enables you to have access to the Microsoft Support.

  • Click Save.
     

Definition of the virtual agent identity in the Branding section

  • Click Configure > Branding in the left menu pane.
             Deploy bot in Teams - App configuration - Menu Branding.png
  • Define the agent icon and the background color.
             Deploy bot in Teams - App configuration - Branding information.png
  • Click Update to download the files. Note: Files must be in PNG format.
     

Definition of the Bot feature in the App features section

  • Click Configure > App features in the left menu pane.
             Deploy bot in Teams - App configuration - Menu App features.png
  • Select the Bot feature.
             Deploy bot in Teams - App configuration - App features - Bot.png

The window for configuring the Bot feature will appear.
         Deploy bot in Teams - App configuration - App features - Bot information.png

  • Specify the feature information.

    Identify your bot: Specify the ID of the Azure bot ID that was generated in step 1.4.

    • Select the Enter a bot ID option.
    • Paste the ID of the Azure Bot app in the field displayed.
       

    What can your bot do?: Define the scope of the bot by selecting the relevant options.

  • Click Save.
    The Command section will be displayed.
             Deploy bot in Teams - App configuration - App features - Menu Command.png
     

Definition of suggestions for input in the Command section

Note: You must add at least one command.

  • Click Add a command.
    The window for configuring the command will appear.
             Deploy bot in Teams - App configuration - App features - Command information.png
  • Specify the information of the new command.

    Command: Enter the suggestion for input. This is the text displayed in the conversational panel.
             example  Help

    Description: Description of the action triggered by the command.
             example  Displaying the help procedure

    Select the scopes: Select the relevant options to define the scope of the bot.

    • Personnal: 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.
    The new command will be added to the list.
             Deploy bot in Teams - App configuration - App features - Command display list.png

Integrating the portal in a Teams conversation tab (optional)

  • Click Configure > App features in the left menu pane.
             Deploy bot in Teams - App configuration - Menu App features.png
  • Select the Personal App feature.
             Deploy bot in Teams - App configuration - App features - Personal app.png
  • Click Create your first personal app tab.
    The window for configuring the new tab will appear.
             Deploy bot in Teams - App configuration - App features - Personnal app information.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. It is automatically generated.

    Content URL: URL of your portal.

    Website URL: URL of your website.

  • Click Save.
     

3. Install your Teams app and test the bot in Teams.

  • Click Teams icon.png Preview in Teams in the toolbar.

         Deploy bot in Teams - App installation - Preview in Teams menu.png

  • The Teams app or Teams online will start.
  • The window for installing the app will be displayed.
    Deploy bot in Teams - App installation - Preview information.png
  • Click Add.
    • The virtual agent conversational window will open.
    • The command will be displayed as a suggestion for input.
      Deploy bot in Teams - App installation - Preview display.png

4. Add the new app to the list of Teams apps of your company.

  • Click Publish in the toolbar.
             Deploy bot in Teams - App installation - Publish menu.png
  • Select the Publish to your org option.
             Deploy bot in Teams - App installation - Publish - Publish to your org.png

The window for publishing will appear.
         Deploy bot in Teams - App installation - Publish information.png

  • Click Publish your app.
    • The process of publication will be launched.
    • The status of the request will be displayed.
      Deploy bot in Teams - App installation - Publish display.png
     

5. Ask the Teams administrator to validate the app, so that it will be available for all company employees.

         Open url.png See the Microsoft documentation (Validate section).

         Deploy bot in Teams - Approbation.png
         Deploy bot in Teams - Approbation detail.png

Tags:
Last modified by Christine Daussac on 2021/10/27 17:15
Created by Administrator XWiki on 2019/12/10 17:25

Shortcuts

Recent changes
•  EV Service Manager
•  Service Apps
•  EV Self Help
•  Service Bots

Powered by XWiki ©, EasyVista 2021