Integrating Dynamics 365 with Azure Functions – Part 3

By | June 18, 2018

Integrating Dynamics 365 with Azure Functions Part 3

Introduction:

In our last post about Azure functions, we saw how to register the workflow assembly and execute the workflow using Microsoft Flow in Dynamics 365. Continuing with our series to call webhooks from CRM, let us register the Azure function created as a Webhook. We register this using the Plugin Registration Tool (PRT)

From the PRT choose Register → Register New Webhook

Integrating Dynamics 365 with Azure Functions Part 3

In the Endpoint URL provide the function URL.

Choose Authentication method as WebhookKey and provide the key. This key is what you passed as the code querystring earlier.

Note: Webhook is registered as Service End Point in CRM

Integrating Dynamics 365 with Azure Functions Part 3

You can now register a step for this webhook just like we do for a plugin assembly.

Integrating Dynamics 365 with Azure Functions Part 3

When you create an Account the PluginExecutionContext is received in the message body of the httprequest in your Azure function. You then need to parse that to get context related details.

Once registered as webhook, you can also invoke this through a workflow by executing the endpoint using the following code:

Once again you receive the Workflow context in the message body that you can parse to read the information passed.

Conclusion:

There are other ways to invoke Azure functions from D365. Azure functions can be called through Logic Apps and you could register Logic Apps on D365 entities and actions. That’s content for another post. So Keep visiting this space :)

Generate Your Own New Leads Now Within Dynamics 365 CRM with Maplytics

Leave a Reply

Your email address will not be published. Required fields are marked *