{Dynamics 365 + Azure + Queue} Part2 – Azure Queue and Identity Provider Configuration

This post is a continuation of my previous post. If you have not read the previous post, I would strongly suggest to read the same and come back here. Here is the link –


In this article we will understand how to configure a queue where Dynamics CRM can post messages and also configure Dynamics CRM as identity provider.

If you are familiar to Azure, normally it is just a few clicks to create a service bus namespace through the azure management portal. However with CRM, it’s a bit trick. This is because Dynamics CRM will automatically append “-sb” to the service bus namespace to identify the access control services namespace. Unfortunately with the latest version of Azure, an associated access control namespace does not get automatically created when you create a service bus. Don’t worry, you can still do that with Power shell. After all limitations sometimes help us to explore new ways as well.

So if your service bus URL is – xrmsdk-ns.servicebus.windows.net, then while configuring ACS, the plugin registration tool will automatically append “-sb” to service bus namespace and try to search for ACS. In this case it would search ACS with the URL – https://xrmsdk-ns-sb.accesscontrol.windows.net

Unfortunately with the latest version of Azure, an associated access control namespace does not get automatically created when you create a service bus which used to happen previously. Don’t worry, you can still do that with Power shell. After all limitations sometimes help us to explore new ways as well.

Download Azure Powershell from the below link.



Once downloaded open Powershell. First type Add-AzureAccount. This will ask to enter you to login to your azure account



Once logged in, you could see your subscription details



Next Type -New-AzureSbNamespace -name crmdemo-ns -CreateACSNamespace 1

Remember here, –createacsnamespace is the flag which creates an associated ACS namespace along with the service bus. With –name we are setting up the service bus namespace. It will prompt for NamespaceType. Enter messaging in the prompt. It will take some time to get the stuffs created.



Once done, you would get all your service bus details.


Now open Azure Service management portal. Go to Service Bus. You should be able to see the newly created service bus namespace.


Open the namespace and then go to Queues and create a new Queue by clicking in the ‘New’ icon in the bottom left corner of the screen. I have named is testqueue


And you are done setting up the queue.

Now in the previous post, I have explained that the whenever something needs to be posted to the queue, Dynamics CRM would be verifying the incoming credentials and provide an IP token. So dynamics crm is our identity provider here. So let’s set up our CRM as identity provider.

Open Azure Management Portal –> Service Bus –> Select your service bus –> Connection information (at the bottom of the screen). You should see a screen like below.


Click on ‘Open ACS Management Portal’.

In the ACS management portal, click on the ‘Service Identities’ under ‘Service Settings’ section. We are configuration Dynamics CRM as Service Identity and not Identity Provider. In Microsoft Azure Active Directory Access Control (also known as Access Control Service or ACS), a service identity is a credential that is registered with an Access Control namespace and is intended for use by autonomous applications or clients. To know more you can visit this link – https://msdn.microsoft.com/en-us/library/gg185945.aspx

Click on Add to add a new Service Identity.

In the name field enter the issuer name. To get the issuer name go to Settings –> Customizations-> Developer resources. And copy the value from the issuer section.


Click on ‘Download Certificate’.

In the “Credential Settings” section select X.509 certificate and then upload the downloaded certificate file.


Click on save and you are done. So we have successfully set-up the queue and also Dynamics CRM as identity provider.

The next step is to configure your Dynamics CRM with Azure from the plugin registration tool which is explained in the next article – https://debajmecrm.com/2016/05/12/azure-crm-integration-blog-series-part3-acs-integration-with-dynamics-crm-and-posting-of-messages-to-queue/

Author: Debajit

I am a Dynamics CRM Most Valuable Professional (MVP) with 12 years of experience in Microsoft .NET Technologies and 9 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side. Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com Author of multiple tools on codeplex including the 'Role Based Views' and 'CRM-Sharepoint Metadata manager & Attachment Extractor' which are available for commercial use under XrmForYou.com For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

2 thoughts on “{Dynamics 365 + Azure + Queue} Part2 – Azure Queue and Identity Provider Configuration”

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 )

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s