-
Notifications
You must be signed in to change notification settings - Fork 144
Deployment Guide manual
To begin, you will need:
- An Azure subscription where you can create the following kind of resources:
- App service
- App service plan
- Bot channels registration
- Azure storage account
- Azure search
- Azure function
- Question answering cognitive service
- 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.
Register three Azure AD applications in your tenant's directory: one for the end user bot, one for the expert bot, and another for the configuration app.
-
Log in to the Azure Portal for your subscription, and go to the "App registrations" blade here.
-
Click on "New registration", and create an Azure AD application.
- Name: The name of your Expert's app - if you are following the template for a default deployment, we recommend "FAQ Plus Expert".
- Supported account types: Select "Accounts in any organizational directory".
- Leave the "Redirect URL" field blank.
-
Click on the "Register" button.
-
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.
- 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".
-
Once the client secret is created, copy its Value; we will need it later.
-
Go back to “App registrations”, then repeat steps 2-6 to create another Azure AD application for the end user app.
- Name: The name of your End User app - if you are following the template for a default deployment, we recommend "FAQ Plus User".
- Supported account types: Select "Accounts in any organizational directory".
- Leave the "Redirect URL" field blank for now.
-
Go back to “App registrations”, then repeat steps 2-3 to create another Azure AD application for the configuration app.
- Name: The name of your configuration app. We advise appending “Configuration” to the name of this app; for example, “FAQ Plus Configuration”.
- Supported account types: Select "Account in this organizational directory only"
- Leave the "Redirect URL" field blank for now.
At this point you have 6 unique values:
- Application (client) ID for the expert bot.
- Client secret for the expert bot.
- Application (client) ID for the end user bot.
- Client secret for the end user bot.
- Application (client) ID for the configuration app.
- Directory (tenant) ID, which is the same for all the apps.
We recommend that you copy these values into a text file, using an application like Notepad. We will need these values later.
- Click on the "Deploy to Azure" button below.
-
When prompted, log in to your Azure subscription.
-
Azure will create a "Custom deployment" based on the ARM template and ask you to fill in the template parameters.
-
Select a subscription and resource group.
- We recommend creating a new resource group.
- The resource group location MUST be in a data center that supports:
- Application Insights
- Azure Search
- Cognitive Service for Language (Question Answering)
- For an up-to-date list, click here, and select a region where the following services are available:
- Application Insights
- Cognitive Service for Language (Question Answering)
- Azure Search
- Enter a "Base Resource Name", which the template uses to generate names for the other resources.
- The app service names
[Base Resource Name]
,[Base Resource Name]-config
, and[Base Resource Name]-questionAnswering
must be available. For example, if you selectcontosofaqplus
as the base name, the namescontosofaqplus
,contosofaqplus-config
, andcontosofaqplus-questionAnswering
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.
-
Fill in the various IDs in the template:
-
Expert Bot Client ID: The application (client) ID of the Expert Bot app
-
Expert Bot Client Secret: The client secret of the Expert Bot app
-
User Bot Client ID: The application (client) ID of the User Bot app
-
User Bot Client Secret: The client secret of the User Bot app
-
Config App Client Id: The application (client) ID of the configuration app
-
Tenant Id: The tenant ID registered in Step 1. If your Microsoft Teams tenant is the same as 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.
- Fill in the "Config Admin UPN List", which is a semicolon-delimited list of users who will be allowed to access the configuration app.
- For example, to allow Megan Bowen (meganb@contoso.com) and Adele Vance (adelev@contoso.com) to access the configuration app, set this parameter to
meganb@contoso.com;adelv@contoso.com
. - You can change this list later by going to the configuration app service's "Configuration" blade.
-
If you wish to change the app name, description, and icon from the defaults, modify the corresponding template parameters.
-
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.
-
Click on "Purchase" to start the deployment.
-
Wait for the deployment to finish. You can check the progress of the deployment from the "Notifications" pane of the Azure Portal. It can take more than 10 minutes for the deployment to finish.
-
Once the deployment has finished, you would be directed to a page that has the following fields:
- expertBotId - This is the Expert bot ID for the FAQ Plus Expert bot.
- userBotId - This is the User bot ID for the FAQ Plus User bot.
- appDomain - This is the base domain for the FAQ Plus Bot.
- configurationAppUrl - This is the URL for the configuration web application.
-
Note the location of the configuration app that you deployed, which is
https://[BaseResourceName]-config.azurewebsites.net
. For example, if you chose "contosofaqplus" as the base name, the configuration app will be athttps://contosofaqplus-config.azurewebsites.net
-
Go back to the "App Registrations" page here.
-
Click on the configuration app in the application list. Under "Manage", click on "Authentication" to bring up authentication settings.
-
Click on Add a platform, select Web.
-
Add new entry to "Redirect URIs": If your configuration app's URL is https://contosofaqplus-config.azurewebsites.net, then add the following entry as the Redirect URIs:
Note: Please refer to Step 3.1 for more details about the URL.
-
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.
- Add new entries to "Redirect URIs": If your configuration app's URL is https://contosofaqplus-config.azurewebsites.net, then add the following entry as the Redirect URIs:
- Click "Save" to commit your changes.
Create a project on the Question Answering portal, following the instructions in the Question Answering documentation.
Select the existing Azure subscription and Choose language resource which created in step 2 "Deploy to your Azure subscription".
Skip the step, "Create a new language resource", because the script that you deployed in Step 2 "Deploy to your Azure subscription" already created the language service. Proceed directly to the next step, by selecting the already create language resource.
Create a new Custom Question Answering project with the same name which was entered in the Step 2.
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 Question Answering documentation to understand about multi-turn conversations.
To enable QnA pairs to appear in the multi-turn follow-up prompts please check the 'Show in contextual flow only' checkbox while creating the QnA pairs as multi-turn works only for contextual flow QnA pairs.
-
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 athttps://contosofaqplus-config.azurewebsites.net
. -
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.
- 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.
- Paste the copied link into the "Team Id" field, then press "OK".
-
Enter the Question Answering Project name into the "Project Name" field, then press "OK".
-
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.
Remember to click on "OK" after changing a setting. To edit the setting later, click on "Edit" to make the text box editable.
Create two Teams app packages: one for end-users to install personally, and one to be installed to the experts' team.
-
Open the
Manifest\EndUser\manifest_enduser.json
file in a text editor. -
Change the placeholder fields in the manifest to values appropriate for your organization.
-
developer.name
(What's this?) -
developer.websiteUrl
-
developer.privacyUrl
-
developer.termsOfUseUrl
-
Replace all the occurrences of
<<userBotId>>
placeholder to your Azure AD end user application's ID from above. This is the same GUID that you entered in the template under "User Bot Client ID". -
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 tocontosofaqplus.azurewebsites.net
. -
Save and Rename
manifest_enduser.json
file to a file namedmanifest.json
. -
Create a ZIP package with the all the files in
Manifest\EndUser
folder -manifest.json
,color.png
andoutline.png
, along with localization files -ar.json
,de.json
,en.json
,es.json
,fr.json
,he.json
,ja.json
,ko.json
,pt-BR.json
,ru.json
,zh-CN.json
,zh-TW.json
. 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 15 files are the top level of the ZIP package, with no nested folders.
-
Rename the
manifest.json
file tomanifest_enduser.json
for reusing the file. -
Open the
Manifest\SME\manifest_sme.json
file in a text editor. -
Repeat the steps from 2 to 4 to replace all the placeholders in the file. The placeholder
<<expertBotId>>
should be replaced by your Azure AD expert application's ID from above. -
Save and Rename
manifest_sme.json
file to a file namedmanifest.json
. -
Create a ZIP package with the all the files in
Manifest\SME
folder (except manifest_legacy) -manifest.json
,color.png
andoutline.png
, along with localization files -ar.json
,de.json
,en.json
,es.json
,fr.json
,he.json
,ja.json
,ko.json
,pt-BR.json
,ru.json
,zh-CN.json
,zh-TW.json
. The two image files are the icons for your app in Teams.
- Name this package
faqplus-sme.zip
, so you know that this is the app for sme. - Make sure that the 15 files are the top level of the ZIP package, with no nested folders.
- Rename the
manifest.json
file tomanifest_sme.json
for reusing the file.
-
If your tenant has sideloading apps enabled, you can install your app by following the instructions here
-
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
-
Install the experts' app (the
faqplus-sme.zip
package) to your team of subject-matter experts. This MUST be the same team that you selected in Step 5.3 above.
- We recommend using app permission policies to restrict access to this app to the members of the experts' team.
- Install the end-user app (the
faqplus-enduser.zip
package) to your users.
Please see our Troubleshooting page.