
Setting up a communication resource for your contact center sounds straightforward, but the process can often feel like a maze of configurations. In this guide, I’ll walk you through the steps in the Azure portal, highlighting where things can get tricky and where to focus. Let’s break down the process step by step, so you can avoid the pitfalls.
While this Microsoft guide Create and manage resources in Azure Communication Services gives a good overview, it doesn’t cover the nuances of Azure Communication Services and how it integrates with Dynamics 365 Contact Center. In this post, I’ll cover all the steps you might not find in the official guide, with additional tips along the way.
Prerequisites
- Microsoft Azure Account:
- You need an active Azure subscription. If you don’t already have one, sign up for a free account or a paid subscription here.
- Access to the Azure Portal:
- Ensure you can log in to the Azure Portal with the Microsoft account associated with your Azure subscription.
- Basic Knowledge of Azure services:
- Familiarize yourself with Azure Communication Services and its capabilities (like video calling, voice, SMS, etc.), as well as how it integrates with other Azure services and third-party systems. Familiarity with the concept of event topics, including creating topics, subscribing to events, and using webhooks for event-driven architectures is also useful.
- Integration Concepts:
- General understanding of API integration, connection strings, and event-driven programming concepts will be helpful for troubleshooting and connecting Azure services to Dynamics 365.
- Security Best Practices:
- Knowledge of best practices for securing your Azure resources, such as managing connection strings, using Role-Based Access Control (RBAC) for permissions, and handling sensitive data securely.
Note: The following set up guide is based on features in the Azure portal. If you’ve started a trial for a phone channel in D365 Contact Center, you first need to end that trial in order to be able to configure a paid subscription.
Create an Azure subscription
The first step is to create an Azure account with an active subscription which is pretty straight forward. If you don’t have a Microsoft account, you’ll need to create one. This is the account you’ll use to manage your Azure subscription. There are different Azure subscriptions to apply for, e.g. the pay-as-you-go. Once your account is set up, you can access the Azure portal at Azure Portal. Log in using the Microsoft account you used to sign up. You can at any time find your subscription information by navigating to the Subscription section under the All services tab in the portal. You can now start creating and managing resources, such as virtual machines, databases, and storage solutions, from the Azure portal.
Create an Azure Resource Group
Next step is to create a resource group. In the upper-left corner of the page, select + Create a resource or use the search bar at the top of the portal.
For the new resource group you need to specify the subscription to which you want to tie the group (i.e. the one you set up in an earlier step), give the resource group a name and specify the Azure geo-region applicable. Keep in mind that different Azure services have regional availability, so the services you can use in a resource group will depend on the region where that resource group is located.

Create an Azure Communication Services resource
You can set up Communication Services either directly in the Azure portal or by using the .NET management SDK. Using the portal, click +Create resource, and search for communication. Create a Communication Services. This is the service that provides both IP communication capabilities like video and voice calling and chat, as well as PSTN capabilities like calling, SMS messaging, and phone number provisioning to utilize that.
Select the Subscription and resource group you to which you want to connect the ACS. Give it a name and list the data location region. Click Review + Create.
Create an app registration
You will need to create an App Registration within Azure Active Directory for the Communication Services to connect to Dynamics 365.
Note! App registrations can only be created by a Global Admin. Global Admin is required to ensure that only trusted applications have access to sensitive resources. This registration is essential in order to continue with the ACS registration in D365 Contact Center.
Go to App Registration – Register an application. Choose the supported account types (Azure AD + type of tenant, e.g. single or multi). Once the registration is done, make a note of the app ID and tenant ID.
Locate connection strings and service endpoints
Next up, we’re gonna locate the connection strings that enable the Communication Services SDKs to connect and authenticate to Azure. You can access your Communication Services connection strings and service endpoints from the Azure portal, but also programmatically with Azure Resource Manager APIs.
In the Azure portal; select Keys from the navigation menu and copy the Connection string or Endpoint values for usage by the Communication Services SDKs. You have access to primary and secondary keys. Primary keys will be used for access from Omnichannel for Customer Service. Hold on to the values you’ve copied.
Create access tokens for temporary access and testing
Navigate to the Identities & User Access Tokens blade within the Settings of your Communication Services resource. Choose the scope of the access tokens. Click Generate.
You’ll see an identity and corresponding user access token generated. You can copy these strings and use them in the sample apps and other testing scenarios.
Acquire a phone number 📲
Navigate to the Phone Numbers blade in the communication resource menu. Press the Get button to launch the wizard. The wizard on the Phone numbers blade will walk you through a series of questions that helps you choose the phone number that best fits your scenario.
Start by selecting the country or region where you want to provision the phone number. After selecting the Country/region, you will then need to select the Use case which best suites your needs. Select your phone number features and click the Next: Numbers button at the bottom of the page to customize the phone number(s) you would like to provision. The summary page will review the Number type, Features, Phone Numbers, and Total monthly cost to provision the phone numbers.
Purchased numbers are available from the Phone numbers section of the resource.
Configure an Azure Event Grid
But first: what is an Event Grid and why is it Used Here?
Azure Event Grid is a fully managed event routing service that allows you to easily send events from one service to another. Think of it as a real-time event delivery system that ensures your applications respond to events as soon as they happen. It acts like a “messenger” for your data: when something changes (for example, a call recording gets updated), Event Grid helps other applications or services know about it immediately.
In the context of Azure Communication Services (ACS), Event Grid is used to manage and send notifications about specific events related to communication activities (like voice calls or SMS). This is critical for integrating communication services with other systems, like Dynamics 365 Contact Center, allowing real-time reactions or trigger of workflows based on those events.
For example, you might want to trigger a notification when a call recording is available or when a customer sends an SMS. With Event Grid, you can easily subscribe to these types of events and automatically process or respond to them.
Unless you’ve used Event Grid before, you’ll need to register the Event Grid resource provider. In the Azure portal, do the following steps:
- On the left menu, select Subscriptions.
- Select the subscription you want to use for Event Grid from the subscription list.
- On the Subscription page, select Resource providers under Settings on the left menu.
- On the Subscription page, select Resource providers under Settings on the left menu.
- Select Microsoft.EventGrid in the provider list.
- Select Register on the command bar.
Create an Event Grid system topic
An Event Grid topic provides a user-defined endpoint that you post your events to. We want to register an Azure Event Grid System Topic so that our app can listen to Azure Communication Service Events. The System Topic is pre-configured by Azure to handle events coming from specific services, like ACS, and is used to receive those events for further action or monitoring.
In the search bar at the top of the Azure Portal, type Event Grid System Topics, and then select Event Grid System Topics from the drop-down list.
Click Create Event Grid System topics and select Azure Communication Services as the Topic Type. For Resource select the ACS resource you created earlier.
Review the settings before clicking Create.
Create an event grid subscription
Next up, you need to create a subscription for specific events like call recording, SMS, etc. Navigate to the Event Grid System Topic created and click + Event Subscription.
Name your subscription so that it matches the Event Grid System Topic name (that way you’ll no which subscription belongs to which topic). Specify the event types you want to subscribe to, by setting the Filter to Event Types to e.g. Recording File Status Updated. Endpoint type should be set to Webhook.
Extract the endpoint ID from Customer Service/Contact Center Admincenter >> Phone Number >> Advanced Settings and copy it from there.
There are three endpoints; one endpoint for incoming calls, one for call recording and one for SMS. If you want to subscribe to all types of events, you need to create one subscription for each with a defined subscription type.
Save the endpoint URL under Endpoint Details and navigate to the Additional Features tab. Check the Microsoft Entra Authentication section specify Tenant ID and Entra Application ID or URI. These are the same details that were specified while connecting ACS from Dynamics 365 as Event Grid App ID and Event Grid App Tenant ID. These can also be extracted from CS/CC Admincenter.
And saved as Microsoft Entra Tenant ID and Application ID.
Click Create. The system will deploy the event subscription.
Create event subscription
From the communication service resource:
- Select the Events tab from the left menu.
- Select + Event Subscription.
On the Create Event Subscription page, follow these steps:
- Enter a name for the event subscription.
- Enter a name for the System topic name.
- Select the event types that you want to receive on the event subscription and select the Endpoint Type as Web Hook.
Select Configure an Endpoint. Enter the link to the webhook and select Confirm Selection.
Get Event Grid application and tenant IDs from the Azure portal
You need to specify the values of Application (client) ID and Directory (tenant) ID in Event grid app id and Event grid app tenant id in Contact Center admin center or Customer Service admin center. Perform the following steps to get these values:
- On the Azure portal, open the App registrations page. If you’re registering your app on the Azure portal for the first time, then perform the following steps. Otherwise, select the registered app and go to step 2:
- On the Register an application page, enter the following details:
- Name: Enter a name for your application.
- Supported account types: Select Accounts in any organizational directory (Any Microsoft Entra ID – Multitenant).
Connect D365 Contact Center to the Azure Communication Services Resource
Before you connect an existing Azure resource to Azure Communication Services, you must retrieve the following information from the Azure portal:
Go to Resource groups and select the required resource group where your Azure Communication Services resource is located. Select Properties in Settings.
On the Properties page, copy the Name and Resource ID field values, which you must specify as ACS Resource Name and ACS Resource ID values in Customer Service admin center or Contact Center admin center.
Find the Communication Service for the Resource Group, and then select Keys in Settings.
On the Keys, copy the Connection string in Primary key. You use this value as the value of Connection string in Customer Service admin center or Contact Center admin center.
On the Properties in Settings, extract the ACS Resource name and ID.
In Omnichannel Admin Center, go to Channels and Phone Numbers. Click on Get started to connect to Azure Communication Services to manage phone numbers for voice and SMS. Choose Use existing resource and enter the names, ID and connection string(s) you’ve extracted from the Azure Portal.
The ACS Resource name is the written name of your ACS resource. The connection string is the connection string taken from the primary key of the ACS. The event grid app ID comes from the app registration and is extractable from the Global Admin. The Event grid app tenant ID will be automatically populated when you specify the app ID.
Click Connect.
You will receive a notification when the connection is established. 🎉
Disclaimer: The steps described in this text can be performed in a different order than what is listed. If you have tried a simpler approach, or have other views on the content – please feel free to leave a comment. 💬
Lämna ett svar