Build a Chat application

Prerequisites

There are few perquisites that need to be in place in order for Chat application to function properly:

  • User must have the Azure Contributor role
  • Team setup : a dedicated team for agents should be created, example “Europe Service Desk”

Create the Bot

  1. Go to the Azure portal.
  2. In the left pane, select Create a resource.
  3. In the search box enter bot, then press Enter.
  4. Select the Azure Bot card.
  5. Select Create.
  6. Enter values in the required fields and review and update settings.
    1. Data residency : Global
    2. Type of App: Single tenant
  7. Select Review + create.
  8. If the validation passes, select Create.

Configure the Bot

  1. Once the deployment completes, select Go to resource. You should see the bot and related resources listed in the resource group you selected.
  2. In the left pane, select Configuration. Define the Messaging endpoint URL as below and save

  3. In the right pane, select Channels. Enable Microsoft Teams Channel and save.

Create Client Secret

  1. Go to the Azure portal.
  2. In the left navigation pane, select Microsoft Entra ID and the App registrations 
  3. Select the already created App (with the same bot name), and the choose Certificates & Secret
  4. Select Client secrets and click on Add a client Secret for your bot
  5. Now copy the key and save it securely, it will be need during Chat flow setup.

Publish the App

  1. In the Developer Portal, select Apps in the left pane.
  2. In the Apps management page, select + New App.
  3. Enter the name and select Add.
  4. Now, Basic Information page will be opened, enter app information.
  5. On App features section, select Bot features and assign the Bot ID to the application and enable all scopes (Personal, Team, Group Chat) and Save
  6. Chat App needs specifics permissions to work.

    In Configure section, select Permissions and for:

    • Team Permissions subsection, select Application and check the following options: Member.Read.Group ChannelMessage.Read.Group
    • Chat/Meeting Permissions subsection, select Application and check the following options: ChatMessage.Read.Chat
  7. Using the Publish button, save the package using Download the app package option.
  8. Uncompress the package, and open manifest.json file (see Files section) using a text editor and add the webApplicationInfo section to allow sending message without being @mentioned.

Don’t forgot to increment version for each update.

"version": "1.0.2”,
...
"webApplicationInfo":
 {
 "id": "<Bot ID>",
 "resource": "[https://AnyString](https://anystring/)"
}
  1. Save the file and compress the folder to get an updated application package.

Publish Application

  1. Sign in to Developer Portal and select Import App from the top pane.
  2. Select the updated app package, and select Replace.
  3. Application overview page will be opened, use Publish button and option Publish to your org to publish the application, the application will be in Pending status
  4. Go to Teams Admin Center https://admin.teams.microsoft.com/policies/manage-apps to approve the already published application, select the application and click Publish.

Now the application could be installed into your Team.


Install Application into Team

  1. On your Team Desktop application select Apps from the left pane then use the search bar to find your application
  2. Choose on Add to a team to add to an already created Team.
  3. Into the team, create needed channels (i.e Incidents, Requests…)

You have finished the chatbot application setup. The last step is to configure the Heedify chat flow and queue.


Files

manifest.json