Azure Bot Service
This article is intended for users who want to extend Grooper's AI Assistants to other channels (such as Teams, Slack, email and more) using Microsoft Azure Bot Services.
Azure Bot Services allow us to create a "bot resource" that can pass chat conversations between AI Assistants and the channel endpoint.
- Microsoft's Azure Bot Framework allows us to expose AI Assistants to a multitude of applications they call "channels".
- Channels include Teams, Slack, email, SMS, and more.
- More information on Azure Bot Service's channel support can be found here.
- In this article, we will show you how to integrate an AI Assistant and Microsoft Teams.
Prerequisite resources
There are three components required to get an AI Assistant up and running in Teams:
- An existing AI Assistant
- A "Bot Gateway Server"
- An Azure Bot service and Bot resource.
Prereq 1: AI Assistant
AI Assistants are Grooper's conversational AIs. They define a role to be used in Grooper Chat sessions. Each assistant has access to a collection of user-defined knowledge resources. This extends an AI chatbots ability to answer questions on domain specific information contained in documents, databases or retrieved from a web service.
- The AI Assistant should already be connected to its knowledge resource(s). It should be tested and working in Grooper before proceeding.
Prereq 2: Bot Gateway Server
This server acts as a router across one or more Grooper Repositories, their AI Assistants, and the Azure Bot Service.
- This server must have Grooper and the Grooper Web Client applications installed.
- Grooper Web Client installs the Grooper Web Services (GWS) website.
- GWS is our new REST API implementation.
- The GWS "/bot" endpoints integrate AI Assistants in Grooper with Azure Bot Services.
- This facilitates traffic between Grooper Repositories, the Bot Gateway Server and the Azure Bot Connector.
- This server must be exposed to the internet by your organization's IT.
- To secure traffic, the Grooper and GWS apps must be configured to use OAuth client credentials in their web.config files.
Information you will need for later:
- The Bot Gateway Server's hostname
Prereq 3: Azure Bot Services
Azure's Bot Service documentation can be found here
We use Azure Bot Services to create an "Azure Bot Resource." This allows us to connect our AI Assistants to different channels, like Teams, Slack, email and more. We will focus on connecting to Teams in this article.
Microsoft's documentation on creating an Azure Bot resource can be found here. The general steps are as follows:
- Go to the Microsoft Marketplace. Search for "Azure Bot".
- Use the "Create" button to create the Azure Bot.
- Give it a "Bot handle" (This is the Bot resource's name in Azure. This should be something your Azure admin can find later).
- Pick a resource group.
- Pick a pricing plan.
- Select the "Type of App".
- If you are unsure, pick "multi tenant". Multi tenant apps will work in single tenant scenarios but not vice versa.
- For "Creation type" choose "Create a new Microsoft App ID".
- The Bot resource does not have an identity by itself. Choose "Create a new..." to create an Entra ID. This will allow us to enter OAuth credentials later on.
Information you will need for later:
- Microsoft App ID
Connecting these resources
Getting these three resources connected is mostly a matter of tying OAuth client credentials together. The most confusing part of the process is Microsoft and Grooper use different terminology in some cases. See the table below for a quick reference.
generic term |
Microsoft Azure Bot resource |
Grooper AI Assistant |
URL/endpoint |
Messaging endpoint |
Bot Connector > URL Path |
client id |
Microsoft App ID |
Bot Connector > Bot ID |
client secret |
client secret (value) |
Bot Connector > Bot Password |
From the AI Assistant:
- Enable the "Bot Connector" property.
- Copy the "URL Path" value. You will need this later.
- This URL looks something like this:
https://<grooper_server>/gws/bot/activities?repository=<repositoryId>&assistant=<aiAssistantId>
- Grooper auto generates most of this URL for you. It fills in the "repository" and "assistant" parameters. You will need to replace
<grooper_server>
with the Bot Gateway Server's name.
- This URL looks something like this:
From the Azure Bot resource:
- Under "Settings" select "Configuration".
- Enter the URL from step 2 for the "Messaging endpoint"
- Locate "Microsoft App ID" and copy this value. You will need this later.
- Next to Microsoft App ID, select "Manage".
- Go to "Client secrets", select "New client secret".
- Enter a description and expiration and click "Add".
- Copy the client secret in the "Value" column. You will need this later.
- You will not have another opportunity to copy the client secret value.
Return to the AI Assistant:
- Expand the "Bot Connector" properties and locate the "Bot ID" property. Enter the Microsoft App ID from step 5.
- Locate the "Bot Password" property. Enter the client secret value from step 9.
From the Bot Gateway Server:
- If you have not done so already, connect the Bot Gateway Server to the AI Assistant's Grooper Repository. Open Grooper Command Console (GCC) and add a connection to the Grooper Repository.
- Configure the GWS web.config file with the Microsoft App ID from Azure.
- You will add the following to the
<appSettings>
section:<add key="bot:ClientId:1" value="00000000-0000-0000-0000-000000000000" />
- Replace 00000000-0000-0000-0000-000000000000 with your Azure Bot resource's Microsoft App ID.
- Multiple Azure Bot resource's can be added using the format
bot:ClientId:2
,bot:ClientId:3
, etc.
- You will add the following to the
Test from the Azure Bot resource
- At this point you should be able to test connectivity in Azure. From the Azure Bot resource, go to "Channels".
- Select "Test in Web Chat".
- From here you should be able to chat with the Grooper AI Assistant in the Azure Web Chat UI.
Adding a Teams app
After you've connected the AI Assistant, the Bot Gateway Server, and the Azure Bot resource together, you can start extending the AI Assistant to other channels, such as Microsoft Teams.
To integrate an AI Assistant with Microsoft Teams, you need to add the Teams channel in Azure and create an app in Teams.
From the Azure Bot resource:
- Go to "Channels"
- Select "Teams" and apply.
- Depending on the channel you select there may be more configuration required than this.
From Teams Developer Portal (https://dev.teams.microsoft.com/home)
- Select "Create a new app"
- Under "Basic information", enter all the required fields.
- For the "Application (client) ID", enter the Azure Bot resource's Microsoft App ID.
- Under "Branding", upload icons for the Teams app.
- Under "Configure" select "App features".
- Select "Bot"
- Select "Enter a Bot ID"
- Enter the Azure Bot resource's Microsoft App ID again.
- Publish the Teams app.
From Teams Admin Center
- Your organization's IT will will need to approve the app. They will see someone in the organization published an app and will determine who needs access to it.