Bot Deployment Instructions
Bot Deployment Instructions
Prerequisites
To begin, you will need:
• An Azure subscription where you can create the following kind of resources:
o App service
o App service plan
o Bot channels registration
o Azure storage account
o Azure search
o Azure function
o QnA Maker cognitive service
o Application Insights
• A team in Microsoft Teams with your group of experts. (You can add and remove
team members later!)
• A copy of the FAQ Plus app GitHub repo
(https://github.com/OfficeDev/microsoft-teams-apps-faqplus)
• A reasonable set of Question and Answer pairs to set up the knowledge base for
the bot.
1. Log in to the Azure Portal for your subscription, and go to the "App registrations"
blade here.
i. Name: The name of your Teams app - if you are following the template for
a default deployment, we recommend "FAQ Plus".
ii. Supported account types: Select "Accounts in any organizational
directory"
iii. Leave the "Redirect URL" field blank.
3. Click on the "Register" button.
4. When the app is registered, you'll be taken to the app's "Overview" page. Copy
the Application (client) ID and Directory (tenant) ID; we will need it later.
Verify that the "Supported account types" is set to Multiple organizations.
5. On the side rail in the Manage section, navigate to the "Certificates & secrets"
section. In the Client secrets section, click on "+ New client secret". Add a
description of the secret and select an expiry time. Click "Add".
6. Once the client secret is created, copy its Value; we will need it later.
7. Go back to “App registrations”, then repeat steps 2-3 to create another Azure AD
application for the configuration app.
We recommend that you copy these values into a text file, using an application like
Notepad. We will need these values later.
Step 2: Deploy to your Azure Subscription
1. Click on the "Deploy to Azure" button below.
3. Azure will create a "Custom deployment" based on the ARM template and ask
you to fill in the template parameters.
• The app service names [Base Resource Name], [Base Resource Name]-config,
and [Base Resource Name]-qnamaker must be available. For example, if you
select contosofaqplus as the base name, the
names contosofaqplus, contosofaqplus-config, and contosofaqplus-qnamaker must
be available (not taken); otherwise, the deployment will fail with a conflict error.
• Remember the base resource name that you selected. We will need it later.
i. Bot Client ID: The application (client) ID of the Microsoft Teams Bot app
ii. Bot Client Secret: The client secret of the Microsoft Teams Bot app
iii. Config App Client Id: The application (client) ID of the configuration app
iv. Tenant Id: The tenant ID registered in Step 1. If your Microsoft Teams
tenant is the same as the Azure subscription tenant, then we would
recommend keeping the default values.
Make sure that the values are copied as-is, with no extra spaces. The template checks
that GUIDs are exactly 36 characters.
7. Fill in the "Config Admin UPN List", which is a semicolon-delimited list of users
who will be allowed to access the configuration app.
8. If you wish to change the app name, description, and icon from the defaults,
modify the corresponding template parameters.
9. Agree to the Azure terms and conditions by clicking on the checkbox "I agree to
the terms and conditions stated above" located at the bottom of the page.
12. Once the deployment has finished, you would be directed to a page that has the
following fields:
• botId - This is the Microsoft Application ID for the FAQ Plus bot.
• appDomain - This is the base domain for the FAQ Plus Bot.
• configurationAppUrl - This is the URL for the configuration web application.
3. Click on the configuration app in the application list. Under "Manage", click on
"Authentication" to bring up authentication settings.
o https://contosofaqplus-config.azurewebsites.net
Note: Please refer to Step 3.1 for more details about the URL.
6. Under "Implicit grant", check "ID tokens" and "Access tokens". The reason to
check "ID tokens" is because you are using only the accounts on your current
Azure tenant and using that to authenticate yourself in the configuration app.
Click configure.
Skip the step, "Create a QnA service in Microsoft Azure", because the ARM template that
you deployed in Step 2 "Deploy to your Azure subscription" already created the QnA
service. Proceed directly to the next step, "Connect your QnA service to your KB".
• Microsoft Azure Directory ID: The tenant associated with the Azure subscription
selected in Step 2.1.
• Azure subscription name: The Azure subscription to which the ARM template
was deployed.
• Azure QnA service: The QnA service was created during the deployment. This is
the same as the "Base resource name"; for example, if you chose
"contosofaqplus" as the base name, the QnA Maker service will be
named contosofaqplus.
Multi-Turn Enablement
With the new updates to the FAQ Plus app template, the knowledge base can now
support multi-turn conversations. To understand the basics of multi-turn conversations,
navigate to the QnA Maker documentation to understand about multi-turn
conversations. To enable multi-turn on the newly created knowledge base, go to
this link to enable multi-turn extraction.
• Note: For best practices with regards to formatting and document structure,
please follow the guidelines here.
After publishing the knowledge base, note the knowledge base ID (see screenshot).
Remember the knowledge base ID: we will need it in the next step.
Step 5: Finish configuring the FAQ Plus App
1. Go to the configuration app, which is at https://[BaseResourceName]-
config.azurewebsites.net. For example, if you chose “contosofaqplus” as the base
name, the configuration app will be at https://contosofaqplus-
config.azurewebsites.net.
2. You will be prompted to log in with your credentials. Make sure that you log in
with an account that is in the list of users allowed to access the configuration
app.
3. Get the link to the team with your experts from the Teams client. To do so, open
Microsoft Teams, and navigate to the team. Click on the "..." next to the team name, then
select "Get link to team".
Click on "Copy" to copy the link to the clipboard.
4. Paste the copied link into the "Team Id" field, then press "OK".
5. Enter the QnA Maker knowledge base ID into the "Knowledge base ID" field, then
press "OK".
6. Customize the "Welcome message" that's sent to your End-users when they
install the app. This message supports basic markdown, such as bold, italics,
bulleted lists, numbered lists, and hyperlinks. See here for complete details on
what Markdown features are supported.
Notes
Remember to click on "OK" after changing a setting. To edit the setting later, click on
"Edit" to make the text box editable.
2. Change the placeholder fields in the manifest to values appropriate for your
organization.
• developer.name (What's this?)
• developer.websiteUrl
• developer.privacyUrl
• developer.termsOfUseUrl
3. Replace all the occurrences of <<botId>> placeholder to your Azure AD
application's ID from above. This is the same GUID that you entered in the
template under "Bot Client ID".
4. In the "validDomains" section, replace all the occurrences of <<appDomain>> with
your Bot App Service's domain. This will be [BaseResourceName].azurewebsites.net .
For example, if you chose "contosofaqplus" as the base name, change the
placeholder to contosofaqplus.azurewebsites.net .
5. Save and Rename manifest_enduser.json file to a file named manifest.json.
6. Create a ZIP package with the manifest.json,color.png, and outline.png. The two
image files are the icons for your app in Teams.
• Name this package faqplus-enduser.zip, so you know that this is the app for end-
users.
• Make sure that the 3 files are the top level of the ZIP package, with no nested
folders.
9. Repeat the steps from 2 to 4 to replace all the placeholders in the file.
• Name this package faqplus-experts.zip, so you know that this is the app for
expert team.
• Make sure that the 3 files are the top level of the ZIP package, with no nested
folders.
12. Rename the manifest.json file to manifest_sme.json for reusing the file.
2. You can also upload it to your tenant's app catalog so that it can be available for
everyone in your tenant to install. See here