In this post I will demonstrate how to migrate the Microsoft Company Communicator between Azure subscriptions.
About Company Communicator (CC)
Company Communicator is a custom Teams app that enables corporate teams to create and send messages intended for multiple teams or large number of employees over chat allowing organization to reach employees right where they collaborate. Use CC for multiple scenarios, such as new initiative announcements, employee onboarding, modern learning and development, or organization-wide broadcasts.
The app provides an easy interface for designated users to create, preview, collaborate and send messages. It's also a foundation for building custom targeted communication capabilities, such as custom telemetry on how many users acknowledged or interacted with a message.
The official version is available at OfficeDev/microsoft-teams-apps-company-communicator, but in case you want to use extra features like tracking who interacted with your messages (reading, buttons clicked, reactions sent) or using a CSV file to send messages, my suggestion is to use the Cristiano's fork.
You can find more details about the Cristiano's version here.
How to migrate it between subscriptions
It is possible to migrate 99% of CC automatically on Azure Portal except by the "Front Door and CDN profiles" one, that requires you do manually create the resource on the destination subscription.
Prerequisites
Before starting, make sure that your destination Azure subscription has permission to 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
- Microsoft.CDN enabled on Resource Provider
Steps
- From the Azure Portal, go to the Company Communicator Resource Group and click on move:
- In the Source + target, select the target subscription and resource group to which you want to move the resources. Then select Next:
- In the Resource to move, click on Add resources:
- Select all resources available, except the Front Door and CDN profiles, and click on Select:
- Click on Next to start the validation if it is possible to migrate the items to another subscription:
This step will check whether these resources can be moved, and this might take a few minutes.
In case you forgot to remove the Front Door and CDN profiles, during the validation, you will receive an error saying that the CDN couldn’t be migrated as it is not supported migrating resource types of 'Microsoft.Network/frontdoors.
If this is your case, remove the Front Door and CDN profiles item from the list. We will manually create it later from scratch in the target subscription. Click on Next again to start over the migration validation.
- Click on next after having all resources validated:
- In the Review, check the I understand that tools and scripts associated with moved resources will not work until I update them to use new resource IDs and click Move to start the migration:
After a few minutes, it will remain only the Front Door and CDN profiles in the original resource group:
As next step, we need to manually create the Front Door and CDN profiles. Copy all information from your front door and then delete it before proceeding as we want to use the same values.
- In the Azure Portal, click on Create a resource, search for Front Door and CDN profiles and click on Create:
- Click on Explore other offerings, select Azure Front Door (classic) and then click on Continue:
- Select the target subscription and the target resource group. Then click on Next: Configuration >:
In case you receive the following error message:
In order to create this CDN profile, please ensure that Microsoft.CDN is listed as a registered Resource Provider in your Azure subscription.
Switch back to the Azure Portal home, click on Subscriptions, select the target subscription, click on Resource Providers, search for Microsoft.CDN, click on the result item and click on Register:
Once registered, switch back to the step 8 to start over the Front Door and CDN profiles creation.
- In the first blade, click on the plus sign to add the frontend host. Then provide the same name of the original front door, in my case it is ocag422c, and then click on Add:
- In the second blade, click on the plus sign to add a backend pool. Name it (I am using the same name as my original one - backendPool1) and click on Add a backend:
- Select Custom host in the backend host type, provide the URL of the App Service of your CC (in my case it is ocag422c.azurewebsites.net) for the backend host name and host header, and click on Add:
- Add the value /health for the path, select GET for the probe method, 255 for the interval and click on Add:
- In the Routing rules blade, click on the plus sign to add a rule:
- Name it to routingRule1, change the accepted protocol to HTTPS only and click on Add:
- Click again in the Routing rules blade, click on the plus sign to add a second rule.
- Name it to routingRule2
- Change the accepted protocol to HTTPS only
- Change the pattern to match from /* to /api/*
- Change the route type to Redirect
- Change the redirect type to Permanent Redirect (308)
- Select Replace for the destination host and provide the URL of your CC App Service (in my case it is ocag422c.azurewebsites.net)
- Click on Add
- Click on Review + create:
- Click on Create to finish.
Done! I hope it helps you!
ヾ(⌐■_■)ノ♪