Dynamics CRM – Azure Integration (Part 1) : Create Azure Service Bus Namespace

Detailed explanation on Dynamics CRM – Azure Integration related technologies, mechanisms, tools and issues is enclosed under three topics in three connected posts.

Connected Posts:
Dynamics CRM – Azure Integration (Part 1) : Create Azure Service Bus Namespace
Dynamics CRM – Azure Integration (Part 2) : Create Dynamics CRM Service Endpoint
Dynamics CRM – Azure Integration (Part 3) : Explore Service Bus Messages

 Windows Azure Services

Microsoft Windows Azure or Azure’s compute mainly offers three types of offerings; Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS).

Simply under Infrastructure as a Service (IaaS), Azure offers servers in the cloud \ virtual machines which give the feeling like a server that has been setup manually with hardware, operating system and running other applications in it. It provides Networking, Storage, Servers and Virtualization.

Windows Azure itself can be taken as a Platform as a Service. Windows Azure offers Middleware services including messaging, listening services, processing messages etc. under this. These components are really awesome when extending application behaviours, exposing to other systems and distributing services to other systems. Service Bus and its entities such as Queues, Topics, Relays, Event Hubs and Notification Hubs play a vital role under this.

Azure Websites are cheapest and easiest method of getting an application on the cloud. Web applications can be deployed from anywhere and Azure take care of CI, network traffic, availability etc.

Understanding Windows Azure Service Bus

Azure Service Bus is a generic, cloud-based messaging system for connecting applications, services and devices. Service Bus is a multi-tenant cloud service which can consist of namespaces with different types of messaging mechanisms. Depending on the requirement messaging mechanisms can be selected and the choices are; Queues, Topics, Relays and Event Hubs.


Namespaces can be defined under Azure Service Bus. Namespace is the container for all Queues, Topics, Relays and Events Hubs and those are identified by their unique names.

Create an Azure Service Bus Namespace

There are two ways of creating Service Bus Namespaces in Azure. One method is using Azure Portal and using PowerShell commands. There’s a different between creating a Namespace via Azure Portal and using PowerShell.


Using Azure Portal

Namespace can be created using Azure Portal as follows.



Using PowerShell

By using following commands in Microsoft Windows PowerShell ISE or Command Line, Namespace is can be created.

New-AzureSBNamespace -Name ‘crmfortress’ -Location ‘Australia Southeast’ -CreateACSNamespace $true –NamespaceType Messaging


It will popup a windows to sign in to the Azure.



Following access connection information will be displayed after successful creation of the Namespace.



Access Connection Information


Namespace created using Azure Portal Namespace created using PowerShell
ConnectionInformation1 ConnectionInformation2
Shared Access Signature (SAS) Active Directory Access Control Service (ACS)
No longer works for Dynamics CRM Default Key can be used when creating Service Endpoint to Azure


Understanding Messaging Mechanisms

Queues : Queue allows one-way communication between sender and the receiver. Message resides in the queue until it retrieved and most importantly only one recipient will receive the message from the queue.

Topics : Topic also allows one-directional way of communication between sender and the receiver. Topics may contain one or more recipients via its subscriptions. Whenever a message comes to the Topic, it can share the message with all subscriptions. Depending on the filters on each subscription, all or some of messages will reach each subscription.

Relays : Unlike Queues and Topics, Relays are bi-directional. It can send messages to both ways,  from sender to receiver and vice versa.

Event Hubs : Highly scalable and can process millions of messages in seconds and analyse the massive amount of data produced by connected devices and applications.


Create a Queue

Using Azure Portal, Queues can be created as follows;


Provide a name for the Queue, Region and select the Namespace.



Note: It’s very important to untick “Enable Partitioning” to avoid issues when passing Plugin Execution Context to the queue. Please refer the previous post on this : Azure Topic Issue : This client is not supported for a partitioned entity. The client version should be greater or equal than version ‘2013-10’


Azure displays the successful message.


Newly created Queue is shown as follows under the Namespace named “crmfortress”.




Windows Azure Service Categories: http://robertgreiner.com/2014/03/windows-azure-iaas-paas-saas-overview/

Azure Service Bus : https://azure.microsoft.com/en-us/documentation/articles/service-bus-fundamentals-hybrid-solutions/#queues


Author: Indika Abayarathne

MSc in IT [University of Colombo] Solutions Architect | Consultant Technologies: Power Platform | Dynamics CE | Azure

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: