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.
https://azure.microsoft.com/en-in/documentation/articles/powershell-install-configure/
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/azure-crm-integration-blog-series-part3-acs-integration-with-dynamics-crm-and-posting-of-messages-to-queue/
Discover more from Debajit's Power Apps & Dynamics 365 Blog
Subscribe to get the latest posts sent to your email.
Good one !! thanks for sharing!!
Thanks a lot. I am glad you liked it.