-
Notifications
You must be signed in to change notification settings - Fork 26
Reflect Deployment Guide
May 7, 2021
Reflect is now part of Microsoft Teams for Education! Learn more at https://aka.ms/reflect
As promised earlier this year, Reflect is now available to all Teams for Education customers. It is ready to use today as soon as it is added to your class team. As a new fully-hosted, production-level solution, Reflect will be simple to enable for your organization and easier for your tenant users to access in Teams. Reflect has also benefitted greatly from your feedback. Reflect now offers localization and additional reporting features in Insights.
To begin, you will need:
- Admin access to the tenant where you want to deploy Reflect
- A text editor tool (e.g. VS Code) to edit JSON files
- Experience working in Visual Studio and familiarity with developing and deploying data solutions on Azure (ideally, experience deploying packages and apps)
- A name for your Teams app. For example, "Reflect"
- An Azure subscription where you can create the following kinds of resources:
- A copy of the Reflect app GitHub repo
- Create a new Azure AD application.
- Create a new custom template for the deployment using the ARM template provided in the Deployment folder in the Reflect GitHub repo. The ARM template will automatically create the necessary resource groups and resources for the Reflect service and then deploy the source code for Reflect in Azure.
- Use the Azure admin portal to enable the newly created Reflect bot to be available inside of Teams.
- Update the Reflect manifest file and install the Reflect application to Teams.
The first step is to create an app registration for the bot. This will generate an Application ID and an App Secret that we will use later when building the template. Follow the steps below to register an Azure AD application in your tenant’s directory for the messaging extension.
-
Log in to the Azure Portal for your subscription, and go to the “App registrations” page at https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps.
-
Select "New registration” and provide a name for the app (any lowercase text string with no spaces is okay) and select the appropriate option for your tenant environment (Single, Multitenant, Multitenant + Microsoft account, or Microsoft account only) and then click "Register".
- Name: The name of your Teams app. For example, "Reflect".
- Supported account types: Select "Accounts in any organizational directory."
- Leave the "Redirect URI" field blank.
(Note: If you aren't sure which tenant option to select, choose the second option in the list for a multitenant app.)

-
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; 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 choose a timeframe for when the secret will expire. Click "Add".

- Once the client secret is created, copy its Value; we will need it later.
At this point you have 2 unique values:
- Application (client) ID for the bot
- Client secret for the bot
We recommend that you copy these values into a text file, using an application like Notepad. We will need these values later.
- Sign into the Azure Portal, select + Create a resource, and then type “Template”.

- Select option “Template deployment (deploy using custom templates)” and then create.

- Click on “Build your own template” in the editor.

- From the GitHub repo for Reflect go to the Deployment folder and click on the file titled "ReflectARMTemplate.json". Copy all the text in the .json file and paste it into the json editor in Azure for your new custom template. (Note: you are replacing all of the default text in the default template with the text you copied from GitHub).
- Click on “Save”.
- From the generated properties and values from the template, edit values as needed like: Subscription, provide a new resource group name, and web app service name.
- Copy and paste the Application ID and App Secret generated in Step 1 into the fields labeled Bot ID and Bot Client Secret.
- Application ID --> Bot ID
- App Secret --> Bot Client Secret
Notes:
- Although, the "Custom deployment" form indicates that only the Subscription and Bot Client Secret fields are required, it is necessary to enter values for all the fields displayed in Parameters section of the "Custom deployment" form.
- Unlike in the example image below, Azure does not allow spaces in the Web App Service field.

- If the validation was successful, then click on the “Create” button below.
- Let the deployment run and it will create all necessary resources under the specified resource group.
-
Go to the resource group you just created. On the right we see the resources that are being created.
-
In the Resource groups screen click on the Web App Bot resource listed in the section labeled "Essentials"

- After clicking on the Web App Bot in the Resource Groups screen, you'll be taken to an overview of the Web App Bot. From here click on "Channels" in the left side menu.

- From the “Channels” screen, click on Teams to add teams as channel for the Reflect bot.

- In the Configure Microsoft Teams window select the option labeled "Microsoft Teams Commercial" and click Save

CAUTION: Once the ARM template deployment is complete, it's important to confirm that the setting for "Supported account types" matches what was set when you created the template. To do this, in the Azure portal navigate to the Reflect app registration you created in Step 1 and make sure that Supported account types matches your organizational requirements (either Single tenant or Multitenant).

-
Download a copy of the Manifest folder from the Reflect GitHub repo here: https://github.com/OfficeDev/Microsoft-Teams-App-Reflect/tree/main/Manifest
-
Use a text editor or VS Code to open the Reflect manifest file (filename: manifest.json) and replace the id field on line 5 with any unique GUID. (Note: you can generate a new GUID for this field using any online GUID generator (e.g. https://www.guidgenerator.com/). Also replace the botId field on lines 31 and 41 with the Application ID that we saved in Step 1.
- Note: Be sure to remove the braces (i.e. curly brackets) when pasting in the GUID value in line 5 and also for the botId field in lines 31 and 41. The GUID value between the quotes should only contain numbers, letters, and dashes.
-
Change the placeholder fields in the manifest to values appropriate for your organization.
- developer.name (What's this?)
- developer.websiteUrl
- developer.privacyUrl
- developer.termsOfUseUrl
-
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.
- 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 to a team by following the instructions below.
- Upload package to a team using the Apps tab: https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/apps/apps-upload#upload-your-package-into-a-team-using-the-apps-tab
- Upload package to a team using the Store: https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/apps/apps-upload#upload-your-package-into-a-team-or-conversation-using-the-store
- 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
- Install the app to a team.
The steps above result in Reflect being available to users in your tenant but they will still need to manually install it themselves if they want to use it in their Teams chats. To ensure that Reflect is installed and visible for all your users, use the Microsoft Teams Admin Center to manage the app setup policy for Reflect so that it appears as a "pinned" app in Teams for all your users.
Details on managing app setup policies in Teams can be found here: https://docs.microsoft.com/en-us/MicrosoftTeams/teams-app-setup-policies
Architecture & Solution Overview