Introduction
In modern business environments, extending and automating Dynamics 365 functionality is essential for improving efficiency and integration. One powerful way to achieve this is by using Azure Function Apps. These lightweight, serverless functions let you run custom code in the cloud to handle CRM events, automate processes, or connect Dynamics 365 with other services. In this blog, we’ll explore how to create an Azure Function App for Dynamics 365 using Visual Studio and publish it to Azure, enabling you to build smarter, more flexible business solutions.
Steps:
- Go to Microsoft Entra admin center → Function Apps → Create.

- Enter a Function App Name for the app. Choose Subscription, Resource Group, Region. Select Runtime Stack to .Net and version 8(LTS), if you are creating functions from Vs code using .net framework.

- Click on Review + create.

- Your App will be ready in few minutes.

Add Functions from Visual Studio:
- Build your Function App project. Right click on project and click on Publish.


- Select Target as Azure to publish functions using authentication from Visual Studio. Select Target as Import Profile, if you have import profile publish setting file downloaded.

- I am using Authentication way. Select Subscription Name, Create/Expand Resource group and select Function App. Click on Finish.

- Publish Profile will start creating.

- Click on Publish.

- Your Functions are now published in Azure Function App.

- Check Azure Function App -> Overview Page. Your Function should be visible.

- To register Dynamics 365 App in Azure Entra Id and create Application User. Visit Dynamics Integration: Register App in Azure Entra ID.