Please wait
Talk to Expert
Integration, Microsoft Azure AD, Microsoft Dynamics Business central

Sending Messages from Business Central to Azure Service Bus Queue.

Yellow And Blue Modern Business LinkedIn Article Cover Image (4)


Integrating Microsoft Dynamics 365 Business Central with Azure Service Bus enables seamless communication between Business Central and other systems or applications. This integration is particularly useful for decoupling applications, ensuring reliable messaging, and enabling scalable and flexible workflows.

Follow the Process below:

Create a Setup Table and Page And added the below fields in the table and page.

1].shared Key Name

2]. Shared Key

3]. Uri

4]. Message

In the Shared Key name and shared key added Below the shared key name and shred key as a primary key.

Shared Key name: – EVS.

Shared Key: – xBM6chGk7+iJotVw1mIyMz+pdyW+e9NzhPXt6fu0Ti8=.

In URI added azure service bus queue URL.

Message box added any test message.

Uri: –

Message: – This is a test message from BC.

After creating a setup codeunit and creating a function and writing a code in those codeunit

First, create one function [CreateAccssToken].

Added a Text Parameters and pass return value Text.

After Encoded Uri using type helper codeunit.

After finding a Unix time using Create Date Time and export time date function using.

Create a signature using encoded and UNIX time as per the below screenshot.

Signature [66]: = 10 Using to break the line between encoded and UNIX time.

After generatinghashbase64string using cryptography management codeunit.

After the Generated hash is encoded.

After creating a accessToken using encoded, encodedHash, Unixtime .

After creating a function create an azure service bus as per the below screen shot.

Create a httpClient Link using httpresopnseMessage and responseMessage.

And user a method “Post”.

AccessToken and Broker Properties use as a request Header

Call both function AccessToken and call azure service bus function in SendSMS Function.

Create a new action in the customer list page and run those codeunit Send Message action.

If message 201 is created means the message successfully insert into the azure service bus.


Thank you for investing your time to read our blog! We’re passionate about sharing valuable insights to help you navigate the world of Business Central.

If you’re curious about how we can assist you in reaching your goals, don’t hesitate to get in touch. Our dedicated team is ready to provide support every step of the way.

Let’s turn your vision into reality together!