-
Notifications
You must be signed in to change notification settings - Fork 20
Deployment guide
To begin, you will need:
- An Azure subscription where you can create the following kinds of resources:
- Azure Logic App
- App service
- App service plan
- Bot channels registration
- Azure storage account
- Azure search
- QnAMaker cognitive service
- Application Insights
- A copy of the List Search app GitHub repo (https://github.com/officedev/microsoft-teams-list-search-app)
- A service account user that List Search will use to access SharePoint
- We strongly recommend creating a new user specifically for List Search, and grant that user access to only those lists that you want to be searchable with this app.
*Not a pre-requisite, but here is a complete video walk-through of the deployment created by our community member in case you want to follow along.
Register two Azure AD applications in your tenant’s directory: one for the messaging extension, and another for the configuration app.
-
Log in to the Azure Portal for your subscription, and go to the “App registrations” blade at https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps.
-
Click on "New registration", and create an Azure AD application.
- Name: The name of your Teams app. For example, "List Search"
- Supported account types: Select "Account in this organizational directory only"
- Leave the "Redirect URI" field blank for now.
-
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 the Directory (tenant) ID; we will need them later.
-
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 for the secret, and set an expiration time if you wish. Click "Add".
-
Once the client secret is created, copy its Value; we will need it later.
-
On the side rail in the Manage section, navigate to the "API permissions" section.
- Click on the "+ Add a permission" button.
- Select "Microsoft Graph".
- Select "Delegated permissions".
- Select the following permissions:
offline_access
-
Sites.Read.All
(in the "Sites" section)
These scopes will give the List Search app the ability to read the same SharePoint lists as the service account user.
-
Go back to “App registrations”, then repeat steps 2-4 to create another Azure AD application for the configuration app. We advise appending “Configuration” to the name of this app; for example, “List Search Configuration”.
At this point you have 4 unique values:
- Application (client) ID for the messaging extension
- Client secret for the messaging extension
- Application (client) ID for the configuration app
- Tenant ID, which is the same for both apps
-
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 datacenter that supports Application Insights, Azure Search, QnA Maker, and Logic Apps. For an up-to-date list, refer to https://azure.microsoft.com/en-us/global-infrastructure/services/?products=logic-apps,cognitive-services,search,monitor, and select a region where the following services are available:
- Application Insights
- Logic Apps
- QnA Maker
- 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]
and[Base Resource Name]-config
must be available. For example, if you selectcontosolistsearch
as the base name, the namescontosolistsearch
andcontosolistsearch-config
must be free; otherwise, the deployment will fail with a Conflict error. - Remember the base resource name that you selected. We will need it later.
- The app service names
-
Fill in the various IDs in the template:
- Messaging Extension Client Id: The application (client) ID of the messaging extension app
- Messaging Extension Client Secret: The client secret of the messaging extension app
- Config App Client Id: The application (client) ID of the configuration app
- Tenant Id: The tenant ID above
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;adelev@contoso.com
. - You can change this list later by going to the configuration app service's "Configuration" blade.
- For example, to allow Megan Bowen (meganb@contoso.com) and Adele Vance (adelev@contoso.com) to access the configuration app, set this parameter to
-
Agree to the Azure terms and conditions by clicking on the check box “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 deployment to finish.
-
Note the location of the configuration app that you deployed, which is
https://[BaseResourceName]-config.azurewebsites.net
. For example, if you chose “contosolistsearch” as the base name, the configuration app will be athttps://contosolistsearch-config.azurewebsites.net
. -
Go back to the “App registrations” page at https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview. Repeat the steps below for each of the two apps that you created.
-
Click on the application in the application list. Under “Manage”, click on “Authentication” to bring up authentication settings.
-
Add a new entry to “Redirect URIs”:
- Type: Web
- Redirect URI: Location (URL) of your configuration app. This is the URL from Step 3.1.
-
Under "Implicit grant", check "ID tokens".
-
Click “Save” to commit your changes.
Remember to do this for both the messaging extension and the configuration Azure AD apps.
-
Go to the configuration app, which is at
https://[BaseResourceName]-config.azurewebsites.net
. For example, if you chose “contosolistsearch” as the base name, the configuration app will be athttps://contosolistsearch-config.azurewebsites.net
. -
When prompted, log in as one of the users that you specified in “Config Admin UPN List”.
-
The List Search app is initially not able to access SharePoint, until it gets an access token. To begin setting the user, click on the "Set SharePoint user" button.
-
You will be presented with a login prompt. Log in as the user that List Search will use to access SharePoint.
-
Click on "Add a new SharePoint list". (The button will be disabled until the SharePoint user is set.)
-
Enter the URL of the SharePoint list that you want to index, then click "Enter". The rest of the input fields on the page will be populated with information from the given SharePoint list.
-
Configure the list by selecting:
- Display name for the list
- The column that should be searchable
- Up to 4 additional columns that will be included inthe result
- How often the list data should be refreshed
-
Click on "Submit". The application will fetch the list data and index it. This can take several minutes, especially if the list is large. Do NOT navigate away from the page.
-
When it's done indexing the list, the app will navigate back to the home page. You can repeat the process and configure up to 4 other SharePoint lists to search.
-
Open the
Manifest\manifest.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
-
-
Change the “botId” placeholder to your Azure AD application's ID from above. This is the same GUID that you entered in the template under “Bot App ID”.
-
In the "validDomains" section, replace the placeholder with your Messaging App Service's domain. This will be
[BaseResourceName].azurewebsites.net
. For example, if you chose “contosolistsearch” as the base name, change the placeholder tocontosolistsearch.azurewebsites.net
. -
Create a ZIP package with
manifest.json
,color.png
, andoutline.png
. The two image files are the icons for your app in Teams.- Make sure that the 3 files are the top level of the ZIP package, with no nested folders.
-
If your tenant has sideloading apps enabled, you can install your app personally by following the instructions below.
- Upload the custom app package using the Store: https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/apps/apps-upload#load-your-package-into-teams
-
You can also upload it to your tenant's app catalog, so that it can be available for everyone in your tenant to install: https://docs.microsoft.com/en-us/microsoftteams/tenant-apps-catalog-teams
-
Run your messaging extension: https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/apps/apps-upload#accessing-your-uploaded-messaging-extension
Please see our Troubleshooting page.