Azure function – Dynamics CE integration guide

Hi Folks,

In this blog post, we will talk about the integration of Dynamics CE first party apps(Model driven) with Azure.

You can integrate with Function Apps from Dynamics using two ways…

  1. Authenticate your Dynamics CE app within your Function app code
  2. Register a web hook to trigger a call to Azure functions using a trigger

We’ll see both the scenarios…

  1. Authenticate your Dynamics CE app within your Function app code

Open your favorite IDE and create azure this case I’ll be using Visual studio.

Create a new Azure Function Project(Make sure you install the Azure functions project template using extensions).

Click on Next option at the bottom, in the next step specify your Function App name as below.

Don’t change other values and click on Create at the bottom of the page.

So in the next step, please make a note of the important things which were highlighted below..

Make sure you select the Target framework as .Net Framework.

You can select any trigger, but for simplicity I am selecting HTTP Trigger here.

In case you need to debug your Azure function and run it locally, then you need to be sure that you install Azurite Storage Emulator in your machine using this link, otherwise you can select None for the storage account option, if in that case make sure that your Azure function don’t need any storage.

Don’t change other values and click on Create at the bottom of the page.

This will take couple of mins to create the necessary scaffolding required for the Azure function.

Now you need to authenticate to your Dynamics Instance, so firstly right click on your project and select Manage Nuget Packages. Then you need to browse for Microsoft.Crm.Sdk.CoreAssemblies and install.

Then you will be able to authenticate your Azure function with Dynamics CE…once you were authenticated you can create a hard coded entity record in Dynamics whenever your function app runs.

The entire code…is hosted in GitHub for reference.

In this way you can an integration between Azure function and Dynamics 365

We will require the API testing tool, here I am using Postman and the following is the link to download “Postman”.

To test the application, click on the Start button on top of Navbar as mentioned below in the screenshot [Button will have Project Name]. It will take a few minutes to Load the Azure Emulator

Run the Function App on the Local machine for testing.

Following is the screen you will be able to see and copy the URL highlighted in the red below and paste that URL in Postman.

Azure Function Tool

Open the Postman and click on the create a new tab

Postman Dashboard

Select request as POST and paste the URL:

After pasting the URL, click on Send

You will get the following response on the Azure Function Tool and Postman

The result after Sending Post Request to Azure Function

If there any error or issue with the Azure Function code, the request will be failed and will be displayed on both Azure Function Tool and Postman [Status will be “4**” or “5**” ]

Now, we will take look at Dynamics 365 CRM environment and check whether the account is created or not.


Created customer from Azure Function.

2. Register a web hook to trigger a call to Azure functions using a trigger

Will update the post to add this logic next time.




Overcome all your limits with Azure #PowerfulAloneBetterTogether Series

Hi Folks,

Hope every one should be very much interested in learning the base line for Power Platform which is Azure.

So this blog serves as the introduction in this #PowerfulAloneBetterTogether series.

Basically while designing your solution for your CE Apps, in order to improve the performance you need to make sure that you perform a minimal set of operations in CE and if in cases where you exceed the timeout limit in Dynamics CE and this is where the remote execution context should be passed to Azure Integration and move all your heavy operations outside your Dynamics CE preferably a line of business application.

So this is where we can think of the following possibilities for our integration…please click on respective link to navigate respectively…

  1. Azure functions/Function Apps
  2. Azure logic Apps
  3. Azure Service Bus
  4. Azure APIM
  5. Azure Event Hub
  6. Azure Cognitive Services
  7. Azure Cosmos DB
  8. Azure Synapse Analytics

I would be detailing about each of this integration with a separate blog post…how each one provides a bunch of alternatives to overcome our current limitations.

Hope this blog series would be of great help and will serve as a reference and your go to guide for your Power Platform and Azure Integrations.

Till then, happy CRM’ing…and stay safe!!!



Sharing thoughts and challenges on Power Platform & Azure along with respective solutions put together...

SharePains by Microsoft MVP Pieter Veenstra

Microsoft 365, Power Platform, SharePoint, Teams, Azure and Dynamics

D365 Demystified

A closer look at Microsoft Dynamics 365.

Vicky Rodgers - Microsoft Dynamics 365

Everything Microsoft Dynamics 365 for Customer Engagement

XRM Tricks (Power Platform & Dynamics CRM )

Power Platform & Dynamics CRM

Microsoft Dynamics 365 UK MCT

All about Microsoft Dynamics 365

High Voltages

Arduino | ESP | Raspberry pi | IoT

Mihail's space

Just another site

Arun Potti's MS CRM blog

Microsoft Dynamics CRM

Sander van de Velde

Microsoft MVP Azure | IoT Platform Architect | Speaker about IoT | Let me add some value

Power Platform Blog

Author : Dharanidharan Balasubramaniam

That API Guy

Making the world a better place one PowerApp/Flow at a time!

Dynamics Back Page

Tips, Tricks, and General Musings on Dynamics 365 (CRM), the Power Platform, Power Apps, Power Automate, Power BI and related technologies

Azure Integration services for Dynamics 365

Azure Integration services for Dynamics 365 Unified Operations, Logic Apps, Azure Functions, REST

Power Maverick

Incredible journey into #Dynamics365, #CDS, #PowerApps #Azure and all good stuff that #Microsoft releases

Unleashing CRM

My Technical Thoughts about Microsoft Dynamics CRM- Unleashed

Srikanth Alluri

My experiences in & around Power Platform + Azure

Debajit's Power Apps & Dynamics 365 Blog

All about Power Apps & Dynamics

Rajeev Pentyala - Microsoft Power Platform

Sharing my knowledge on Power Platform, Dynamics 365, Azure & .Net Stack

Bansal Blogs - Dynamics 365, PowerApps, Microsoft Flows, Power BI

Programming demands a lot more than simple mastery in tools and technologies

%d bloggers like this: