-
Notifications
You must be signed in to change notification settings - Fork 403
Deployment guide for GCCH
- Deployment Guide
To begin, you will need:
- An Azure subscription where you can create the following kinds of resources:
- App Service
- App Service Plan
- Bot Channels Registration
- Azure Function
- Azure Storage Account
- Service Bus
- Application Insights
- Azure Key vault
- A role to assign roles in Azure RBAC. To check if you have permission to do this,
- Goto the subscription page in Azure portal. Then, goto Access Control(IAM) and click on
View my access
button. - Click on your
role
and in search permissions text box, search forMicrosoft.Authorization/roleAssignments/Write
. - If your current role does not have the permission, then you can grant yourself the built in role
User Access Administrator
or create a custom role. - Please follow this link to create a custom role. Use this action
Microsoft.Authorization/roleAssignments/Write
in the custom role to assign roles in Azure RBAC.
- Goto the subscription page in Azure portal. Then, goto Access Control(IAM) and click on
- A team with the users who will be sending messages with this app. (You can add or remove team members later!)
- A copy of the Company Communicator app GitHub repo (https://github.com/OfficeDev/microsoft-teams-company-communicator-app)
Register three Azure AD application in your tenant's directory: one for author bot, one for user bot and another for graph app.
-
Log in to the Azure Portal for your subscription, and go to the App registrations blade.
-
Click New registration to create an Azure AD application.
- Name: Name of your Teams App - if you are following the template for a default deployment, we recommend "Company Communicator User".
- Supported account types: Select "Accounts in any organizational directory" (refer image below).
- Leave the "Redirect URI" field blank for now.
-
Click Register to complete the registration.
-
When the app is registered, you'll be taken to the app's "Overview" page. Copy the Application (client) 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 for the secret, and choose when the secret will expire. 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-5 to create another Azure AD application for the author bot.
- Name: Name of your Teams App - if you are following the template for a default deployment, we recommend "Company Communicator Author".
- Supported account types: Select "Accounts in any organizational directory".
- Leave the "Redirect URI" field blank for now.
-
Go back to "App registrations", then repeat steps 2-5 to create another Azure AD application for the Microsoft Graph app.
- Name: Name of your Teams App - if you are following the template for a default deployment, we recommend "Company Communicator App".
- Supported account types: Select "Accounts in this organizational directory only(Default Directory only - Single tenant)".
- Leave the "Redirect URI" field blank for now.
At this point you should have the following 7 values:
- Application (client) ID for the user bot.
- Client secret for the user bot.
- Directory (tenant) ID.
- Application (client) Id for the author bot.
- Client secret for the author bot.
- Application (client) Id for the Microsoft Graph App.
- Client secret for the Microsoft Graph App.
We recommend that you copy the values, we will need them 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 Company Communicator ARM template and ask you to fill in the template parameters.
Note: Please ensure that you don't use underscore (_) or space in any of the field values otherwise the deployment may fail.
-
Select a subscription and a resource group.
- We recommend creating a new resource group.
- The resource group location MUST be in a datacenter that supports all the following:
- Storage Accounts
- Application Insights
- Azure Functions
- Service Bus
- App Service
-
Enter a Base Resource Name, which the template uses to generate names for the other resources.
- The
[Base Resource Name]
must be available. For example, if you selectcontosocommunicator
as the base name, the namecontosocommunicator
must be available (not taken); otherwise, the deployment will fail with a Conflict error. - Please make sure to limit the base resource name with maximum of 18 characters.
- Remember the base resource name that you selected. We will need it later.
- The
-
Update the following fields in the template:
-
User Client ID: The application (client) ID of the Microsoft Teams user bot app. (from Step 1)
-
User Client Secret: The client secret of the Microsoft Teams user bot app. (from Step 1)
-
Tenant Id: The tenant ID. (from Step 1)
-
Author Client ID: The application (client) ID of the Microsoft Teams author bot app. (from Step 1)
-
Author Client Secret: The client secret of the Microsoft Teams author bot app. (from Step 1)
-
Microsoft Graph App Client ID: The application (client) ID of the Microsoft Graph Azure AD app. (from Step 1)
-
Microsoft Graph App Secret: The client secret of the Microsoft Graph Azure AD app. (from Step 1)
-
Proactively Install User App [Optional]: Default value is
true
. You may set it tofalse
if you want to disable the feature. -
User App ExternalId [Optional]: Default value is
148a66bb-e83d-425a-927d-09f4299a9274
. This MUST be the sameid
that is in the Teams app manifest for the user app. -
Header Text [Optional]: Default value is
Company Communicator
. This is the banner text that will appear starting v5.2 and later, you will have the option to modify later. -
Header Logo URL [Optional]: Default image is Microsoft logo. You will have the option to modify later.
-
Hosting Plan SKU [Optional]: The pricing tier for the hosting plan. Default value is
Standard
. You may choose between Basic, Standard and Premium. -
Hosting Plan Size [Optional]: The size of the hosting plan (small - 1, medium - 2, or large - 3). Default value is
2
.Note: The default value is 2 to minimize the chances of an error during app deployment. After deployment you can choose to change the size of the hosting plan.
-
Service Bus Web App Role Name Guid [Optional]: Default value is
958380b3-630d-4823-b933-f59d92cdcada
. This MUST be the sameid
per app deployment.Note: Make sure to keep the same values for an upgrade. Please change the role name GUIDs in case of another Company Communicator Deployment in same subscription.
-
Service Bus Prep Func Role Name Guid [Optional]: Default value is
ce6ca916-08e9-4639-bfbe-9d098baf42ca
. This MUST be the sameid
per app deployment. -
Service Bus Send Func Role Name Guid [Optional]: Default value is
960365a2-c7bf-4ff3-8887-efa86fe4a163
. This MUST be the sameid
per app deployment. -
Service Bus Data Func Role Name Guid [Optional]: Default value is
d42703bc-421d-4d98-bc4d-cd2bb16e5b0a
. This MUST be the sameid
per app deployment. -
Storage Account Web App Role Name Guid [Optional]: Default value is
edd0cc48-2cf7-490e-99e8-131311e42030
. This MUST be the sameid
per app deployment. -
Storage Account Prep Func Role Name Guid [Optional]: Default value is
9332a9e9-93f4-48d9-8121-d279f30a732e
. This MUST be the sameid
per app deployment. -
Storage Account Data Func Role Name Guid [Optional]: Default value is
5b67af51-4a98-47e1-9d22-745069f51a13
. This MUST be the sameid
per app deployment. -
DefaultCulture [Optional]: By default the application uses
en-US
locale. You can choose the locale from the list, if you wish to use the app in different locale. Also, you may add/update the resources for other locales and update this configuration if desired. -
SupportedCultures [Optional]: This is the list of locales that application supports currently. You may add/update the resources for other locales and update this configuration if desired.
Note: Make sure that the values are copied as-is, with no extra spaces. The template checks that GUIDs are exactly 36 characters.
-
-
Update the "Sender UPN List", which is a semicolon-delimited list of users (Authors) who will be allowed to send messages using the Company Communicator.
- For example, to allow Megan Bowen ([email protected]) and Adele Vance ([email protected]) to send messages, set this parameter to
[email protected];[email protected]
. - You can change this list later by going to the App Service's "Configuration" blade.
- For example, to allow Megan Bowen ([email protected]) and Adele Vance ([email protected]) to send messages, set this parameter to
-
Update the "Delete Admin UPN List", which is a semicolon-delimited list of users (Authors) who will be allowed to delete historical messages.
- For example, to allow Megan Bowen ([email protected]) and Adele Vance ([email protected]) to delete historical messages, set this parameter to
[email protected];[email protected]
. - You can change this list later by going to the App Service's "Configuration" blade.
- For example, to allow Megan Bowen ([email protected]) and Adele Vance ([email protected]) to delete historical messages, set this parameter to
-
If you wish to change the app name, description, and icon from the defaults, modify the corresponding template parameters.
-
If you wish to change the header/banner text and logo, refer to FAQ in the Wiki.
-
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.
Note: The Bot Service will fail initially. Follow the steps below to resolve the issue.
-
While the deployment is still in progress, go to the Resource group. Search for Author Bot Service created by ARM template. Name of Bot Service will be base resource name which was provided earlier.
-
Click on Channels in Settings section of Bot Services and click on "Microsoft Teams" under Available Channels.
-
Accept the Terms of Service.
-
Select "Microsoft Teams for GCC High" and click on Apply. Repeat the above steps for User Bot Service.
-
Wait for the deployment to finish. You can check the progress of the deployment from the "Notifications" pane of the Azure Portal. It may take up to an hour for the deployment to finish.
If the deployment fails, see this section of the Troubleshooting guide.
-
Once the deployment is successfully completed, go to the deployment's "Outputs" tab, and note down the following values. We will need them later.
-
authorBotId: This is the Microsoft Application ID for the Company Communicator app. For the following steps, it will be referred to as
%authorBotId%
. -
userBotId: This is the Microsoft Application ID for the Company Communicator app. For the following steps, it will be referred to as
%userBotId%
. -
appDomain: This is the base domain for the Company Communicator app. For the following steps, it will be referred to as
%appDomain%
.
-
authorBotId: This is the Microsoft Application ID for the Company Communicator app. For the following steps, it will be referred to as
-
Note that you have the
%authorBotId%
,%userBotId%
and%appDomain%
values from the previous step (Step 2).If do not have these values, refer this section of the Troubleshooting guide for steps to get these values.
-
Go to App Registrations page here and open the Microsoft Graph Azure AD app you created (in Step 1) from the application list.
NOTE: This step is to set-up authentication for Microsoft Graph Azure AD app.
-
Under Manage, click on Authentication to bring up authentication settings.
-
Add a new entry to Redirect URIs:
- Type: Web
-
Redirect URI: Enter
https://%appDomain%/signin-simple-end
for the URL e.g.https://appName.azurefd.us/signin-simple-end
-
Under Implicit grant, check ID tokens.
-
Click Save to commit your changes.
-
-
Back under Manage, click on Expose an API.
-
Click on the Set link next to Application ID URI, and change the value to
api://%appDomain%
e.g.api://appName.azurefd.us
. -
Click Save to commit your changes.
-
Click on Add a scope, under Scopes defined by this API. In the flyout that appears, enter the following values:
- Scope name: access_as_user
- Who can consent?: Admins and users
- Admin and user consent display name: Access the API as the current logged-in user
- Admin and user consent description: Access the API as the current logged-in user
-
Click Add scope to commit your changes.
-
Click Add a client application, under Authorized client applications. In the flyout that appears, enter the following values:
-
Client ID:
5e3ce6c0-2b1f-4285-8d4b-75ee78787346
-
Authorized scopes: Select the scope that ends with
access_as_user
. (There should only be 1 scope in this list.)
-
Client ID:
-
Click Add application to commit your changes.
-
Repeat the previous two steps, but with client ID =
1fec8e78-bce4-4aaf-ab1b-5451cc387264
. After this step you should have two client applications (5e3ce6c0-2b1f-4285-8d4b-75ee78787346
and1fec8e78-bce4-4aaf-ab1b-5451cc387264
) listed under Authorized client applications.
-
-
Back under Manage, click on Manifest.
- In the editor that appears, find the
optionalClaims
property in the JSON Azure AD application manifest, and replace it with the following block:
"optionalClaims": { "idToken": [], "accessToken": [ { "name": "upn", "source": null, "essential": false, "additionalProperties": [] } ], "saml2Token": [] },
- Click Save to commit your changes.
- In the editor that appears, find the
Continuing from the Microsoft Graph Azure AD app registration page where we ended Step 3.
-
Select API Permissions blade from the left hand side.
-
Click on Add a permission button to add permission to your app.
-
In Microsoft APIs under Select an API label, select the particular service and give the following permissions,
-
Under Commonly used Microsoft APIs,
-
Select Microsoft Graph, then select Delegated permissions and check the following permissions,
- GroupMember.Read.All
- AppCatalog.Read.All
-
then select Application permissions and check the following permissions,
- GroupMember.Read.All
- User.Read.All
- TeamsAppInstallation.ReadWriteForUser.All
-
Click on Add Permissions to commit your changes.
Please refer to Solution overview for more details about the above permissions.
-
-
If you are logged in as the Global Administrator, click on the Grant admin consent for %tenant-name% button to grant admin consent, else inform your Admin to do the same through the portal.
Note: If admin consent is not provided, the third and fourth options to send messages to security groups and to everyone within the organization will not work. Additionally, the fourth option will appear as disabled.
Company communicator app comes with 2 applications Author, User. The Author application is intended for employees who create and send messages in the organization, and the User application is intended for employees who receive the messages.
Create two Teams app packages: one to be installed to an Authors team and other for recipient’s to install personally and/or to teams.
-
Make sure you have cloned the app repository locally.
-
Open the
Manifest\manifest_authors.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
<<appDomain>>
placholder in the configurationUrl setting to be the%appDomain%
value e.g. "https://appName.azurefd.us/configtab
". -
Change the
<<botId>>
placeholder in the botId setting to be the%authorBotId%
value - this is your author Azure AD application's ID from above. This is the same GUID that you entered in the template under "Author Client ID". Please note that there are two places in the manifest (for authors) where you will need to update Bot ID. -
Change the
<<appDomain>>
placeholder in the validDomains setting to be the%appDomain%
value e.g. "appName.azurefd.us
". -
Change the
<<botId>>
placeholder in the id setting of the webApplicationInfo section to be the%authorBotId%
value. Change the<<appDomain>>
placeholder in the resource setting of the webApplicationInfo section to be the%appDomain%
value e.g. "api://appName.azurefd.us
". -
Copy the
manifest_authors.json
file to a file namedmanifest.json
. -
Create a ZIP package with the
manifest.json
,color.png
, andoutline.png
. The two image files are the icons for your app in Teams.- Name this package
company-communicator-authors.zip
, so you know that this is the app for the author teams. - Make sure that the 3 files are the top level of the ZIP package, with no nested folders.
- Name this package
-
Delete the
manifest.json
file.
Repeat the steps above but with the file Manifest\manifest_users.json
and use %userBotId%
for <<botId>>
placeholder. Note: you will not need to change anything for the configurationUrl or webApplicationInfo section because the recipients app does not have the configurable tab. Name the resulting package company-communicator-users.zip
, so you know that this is the app for the recipients.
-
Install the authors app (the
company-communicator-authors.zip
package) to your team of message authors.- Note that even if non-authors install the app, the UPN list in the app configuration will prevent them from accessing the message authoring experience. Only the users in the sender UPN list will be able to compose and send messages.
- If your tenant has sideloading apps enabled, you can install your app by following the instructions here.
-
Add the configurable tab to the team of authors, so that they can compose and send messages.
-
Upload the User app to your tenant's app catalog so that it is available for everyone in your tenant to install.
IMPORTANT: Proactive app installation will work only if you upload the User app to your tenant's app catalog.
- Install the User app (the
company-communicator-users.zip
package) to the users and teams that will be the target audience.
If
proactiveAppInstallation
is enabled, you may skip this step. The service will install the app for all the recipients when authors send a message.
Please check the Troubleshooting guide.