Set up Azure Service Bus
3 minute read
When using multiple Business Central environments, you can use Azure Service Bus to transfer data between the companies. Azure Service Bus is a cloud-based messaging service that enables you to send messages between applications and services. Azure Service Bus supports a set of cloud-based, message-oriented middleware technologies including reliable message queuing and durable publish/subscribe messaging. For more information, see Azure Service Bus.
Before configuring the connection to Azure Service Bus in Business Central, a namespace must be created in Azure Service Bus. The namespace is the container for all messaging components in Azure Service Bus. The namespace is created in the Azure portal.
To create a namespace in Azure Service Bus
- Register an application for API connection: Register an application (MS Learn)
- Save the Application (client) ID for later
- Create a Client Secret and save the secret value for later.
- Create service bus namespace, see Create a namespace (MS Docs). It must be Standard tier or better.
- Save the Name of the namespace for later
- Save the Subscription Id where the Namespace was created for later
- Under Access control (IAM), add the registered application from step 1 as Role, Azure Service Bus Data Owner: Authenticate and authorize an application (MS learn)
After completion you will have the following values to insert into Business Central:
- Directory (tenant) ID from Azure AD
- Application (client) ID from the created App Registration.
- Client Secret from the created App Registration.
- Subscription Id where the ASB Namespace was created
- Azure Service Bus Namespace name from the created Azure Service Bus Namespace
Note
It is important to clearly separate the test and production environments. The test and production environments must never use the same Azure Service Bus namespace. The test environment must be set up with a separate Azure Service Bus namespace, and the production environment must be set up with a separate Azure Service Bus namespace. If multiple test environments are used, each test environment must be set up with a separate Azure Service Bus namespace.To set up Azure Service Bus in Business Central
- Choose the 🔎 icon, enter Azure Service Bus (IDM), and then choose the related link.
- Fill in the fields as necessary. Hover over a field to read a short description.
Tip
When an environment is copied to a sandbox, the Azure Service Bus connection is automatically disabled in the sandbox. If you want to use enable it, remember to set up and select a namespace dedicated to that sandbox.To set parties to use Azure Service Bus
- Choose the 🔎 icon, enter Parties (IDM), and then choose the related link.
- Select the party to set up for Azure Service Bus.
- Select Azure Service Bus in the Data Transfer Type field.