Configure Dynamics 365 and Azure Service Bus Integration (using OneWay relay and listener)

Continuing our previous post

https://nishantrana.me/2017/03/22/configure-dynamics-365-and-azure-service-bus-integration-through-queue-and-queueclient/

Here we’d add a new Shared Access Policy in the Azure Service Bus.

We can copy the connection string

Paste it in Service Endpoint registration dialog box of Plugin Registration tool

Change the designation type to OneWay, use https for the namespace address.

Register a step for creation of lead

Now we go and create a lead record, which triggers our plugin and creates a system job for it.

The system job fails as we do not have any active listener at the end point.

Now let us create a simple windows application which will act as listener.

Basically, we need to implement IServiceEndPointPlugin Interface, create a Service Host, define a new transportclientendpointbehaviour with shared access signature token provider, use WS2007HttpRelayBinding in our service end point.

Now run the listener application, and create a lead record in CRM.

We can see the break point hit in our listener application’ Execute method. Execute method is invoked whenever a message is posted to the service bus by Microsoft Dynamics 365.

System Job also shows the status as succeeded as we had our listener registered to the endpoint and running.

The helpful post

http://www.crmviking.com/2016/10/microsoft-crm-azure-service-bus-part-3.html

https://blogs.msdn.microsoft.com/swetagu/2016/04/12/crm-azure-service-endpoint-and-listener-deep-dive/

http://iunknownme.com/blog/2015/05/27/dynamics-crm-integration-using-azure-service-bus-part-i-using-service-bus-relays/

Hope it helps.


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

3 thoughts on “Configure Dynamics 365 and Azure Service Bus Integration (using OneWay relay and listener)”

Share your thoughts

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s