If you are aware about Microsoft App Template’s then you have come across Company Communicator. The most safe way to deploy the Company Communicator is to make sure that your Azure subscription and Office 365 are in the same tenant. But that is not always the case. In this blog post I highlight what to do differently compared to the deployment guide until that guide is updated.
But first: what are App Templates? In short App templates are production-ready apps for Microsoft Teams that are community driven, open-source, and available on GitHub. Each contains detailed instructions for deploying and installing that app for your organization, providing a ready-to-use app that you can install and begin using immediately. The complete source code is available as well, so you can explore it in detail, or fork the code and alter it to meet your specific needs. (snippet from App Templates page). Take a look here for available App Templates.
Deploying Company Communicator to a multi-tenant environment
First the expectation: I am talking here deploying Company Communicator to a situation where Azure subscription resides in a different tenant than Office 365. This means that all authors and users are still inside the same Office 365 – only the app itself is running in the other tenant’s Azure.
This is not a guide how to change Company Communicator to be a multi-tenant application – it doesn’t even seem that it would be a supported scenario without adding customizations to the app template.
First – familiarize yourself with the Company Communicator Deployment Guide. This post does not repeat all steps in that guide since they can be found from there. Instead I point out two important changes from that guide:
1. Register Azure AD application
The guide states that these steps are done to the Azure subscription tenant. That is incorrect. Application Registration is done to the tenant where your users are. That is the Office 365 tenant. Everything else is done according to the guide, except to the Office 365 tenant.
2. Deploy to your Azure subscription
For the step 2 you use Azure subscription tenant and deploy the solution. This is done according to the guide.
Note: you may have to deploy the solution multiple times. In case the deploy has any fails or errors you need to cancel it and delete all resources in the Resource Group (best practice: make sure you use a dedicated Resource Group for this one so it is easy to clean up). Also if the deployment takes less than 50 minutes something may not be working(or something like web site code is missing – yes this did happen) despite the deployment shows everything was ok..
3. Set-up Authentication and steps 4 & 5
This is done against those Application Registrations you created in the step 1 to Office 365 tenant. You use the app domain from Step 2 (Azure deployment) and Application IDs from Step 1.
One additional step you need to add: make sure you add the same redirect URL (with ID Tokens checked) to Company Communicator Users App Registration as you add for the Authors app (as in the Guide).
When setting up permissions this is done in the Office 365 like setting up authentications.
For Teams application manifests you use Application IDs from Step 1 and application domain (app domain) from Step 2.
I hope you found this useful! Thank you for reading!
3 thoughts on “How to deploy the Company Communicator (App Template application) to multitenant setup”
Thank you so much Vesa. This post helped extraordinarily.
LikeLiked by 1 person
How much does BOT on Azure cost?
This depends on what Azure resources it uses and how much.
For example that Company Communicator has a cost estimate documentation available, with estimated calculations
1M messages has been estimated to less than $80. But that is just an estimate and depends heavily on services and their level chosen.
There is also Azure Pricing Calculator, and if you click that link from Company Communicator’s Cost estimate page it will use that bot as a template
Power Virtual Agents used only within Microsoft Teams can be used with Teams license without extra costs. If you are experimenting and trying out bots the first time, I recommend you check Dataverse for Teams and Power Virtual Agents there.