August 16, 2026

Deploy Azure Functions and Connect SitecoreAI Forms to Dataverse

Deploy Azure Functions & Connect SitecoreAI Forms to Dataverse

Posted on August 16, 2026  •  7 minutes  • 1472 words

This article is part of a series.

  1. Part 1
    Introduction to SitecoreAI and Microsoft Dataverse Integration Read more →
  2. Part 2
    Connecting SitecoreAI with Microsoft Dataverse: Authentication & Access Configuration Read more →
  3. Part 3
    Azure Functions for Dataverse CRUD in .NET Read more →
  4. Part 4
    Deploy Azure Functions and Connect SitecoreAI Forms to Dataverse
Table of contents

🚀 Deploy Azure Functions and Connect SitecoreAI Forms to Microsoft Dataverse

In the previous article in this series, we built a production-ready Azure Functions backend for Microsoft Dataverse CRUD operations:

Azure Functions for Dataverse CRUD in .NET

In this fourth article, we complete the end-to-end integration by deploying those Functions to Azure, connecting a SitecoreAI Form through a secure webhook, creating an enquiry row in Dataverse, and retrieving enquiry records through a protected GET endpoint.

The final flow is straightforward:

SitecoreAI FormAzure FunctionMicrosoft Dataverse

📋 What We Will Build

  • Validate the Azure Functions project locally.
  • Deploy the .NET isolated Function App to Azure.
  • Configure Dataverse application settings securely.
  • Make the create endpoint compatible with SitecoreAI webhook responses.
  • Add a protected GET endpoint for enquiry retrieval.
  • Create and activate a SitecoreAI enquiry form.
  • Configure an API-key-protected SitecoreAI webhook.
  • Test the complete flow and verify the Dataverse row.

🏗️ Architecture Overview

The flow decouples frontend collection from your Dataverse data plane using a secure, serverless intermediary:

SitecoreAI Form Webhooks

🔄 Execution Flow Sequence

SitecoreAI Submit Form Webhooks

🧰 Prerequisites

  • The Azure Functions project from Session 3.
  • An active Azure subscription with permissions to deploy Function Apps and Key Vault resources.
  • A Microsoft Dataverse environment and the target enquiry table.
  • An Entra ID App Registration / Application User with least-privilege Dataverse permissions.
  • Visual Studio 2022 with the Azure development workload, or VS Code with Azure Functions Core Tools.
  • Access to SitecoreAI Forms and Page Builder with permissions to manage webhooks.

SitecoreAI Forms

SitecoreAI Forms can dispatch data to external systems using webhooks. Review the official workflow in SitecoreAI Forms Overview

📺 Video Walkthrough: End-to-End Integration

💻 Step-by-Step Walkthrough


1. 🧪 Local Validation of Azure Functions

Before pushing changes to Azure, ensure the .NET 8/9 Isolated worker starts and executes the CRUD routes locally.

dotnet clean
dotnet restore
dotnet build --configuration Release
func start

🛣️ Typical local endpoints

Typical local endpoints are:

POST   http://localhost:7071/api/dataverse/enquiries
GET    http://localhost:7071/api/dataverse/enquiries
GET    http://localhost:7071/api/dataverse/enquiries/{id}
PATCH  http://localhost:7071/api/dataverse/enquiries/{id}
DELETE http://localhost:7071/api/dataverse/enquiries/{id}

📡 Test Local Endpoints

Test the create endpoint:

curl -X POST "http://localhost:7071/api/dataverse/enquiries" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Amit Kumar",
    "email": "amit@example.com",
    "message": "Local SitecoreAI integration test",
    "test": false
  }'
Test the retrieval endpoint:
curl "http://localhost:7071/api/dataverse/enquiries?pageSize=25"

2. ☁️ Deploy Azure Functions to the Cloud


Microsoft provides direct deployment support through Visual Studio and VS Code. Refer to Develop Azure Functions using Visual Studio .

📦 Deployment Steps (Visual Studio 2022)

  1. Right-click the Azure Functions Project ➡ Select Publish.

  2. Select Target: AzureSpecific Target: Azure Function App (Windows or Linux).

  3. Choose your existing Resource Group and hosting plan, or provision a new one.

  4. Select the Subscription, Resource Group, Region, Storage Account, and Application Insights resource.

  5. Click Publish and allow the remote build to complete.

Example Function App Base URL:

https://func-sitecoreai-dataverse-prod-uks.azurewebsites.net

3. 🔐 Configure App Settings & Azure Key Vault

local.settings.json is strictly for local execution. In Azure:

  1. Navigate to Function App ➡ Settings ➡ Environment variables ➡ App settings.

  2. Add your Dataverse application credentials:

App Setting KeyProduction Value / Key Vault Reference
Dataverse__Urlhttps://orgXXXXX.crm.dynamics.com
Dataverse__ClientIdyour-entra-app-client-id
Dataverse__TenantIdyour-tenant-id
Dataverse__ClientSecret@Microsoft.KeyVault(SecretUri=https://kv-app.vault.azure.net/secrets/DVSecret/)
APPLICATIONINSIGHTS_CONNECTION_STRINGInstrumentationKey=…

Security Best Practice

Enable System-Assigned Managed Identity on the Function App and grant it Key Vault Secrets User role to resolve Key Vault references seamlessly.

4. 🔌 Make the Create Function Webhook-Compatible

SitecoreAI requires a predictable response contract. If the endpoint returns HTTP 200 without { "isSuccessful": true }, SitecoreAI flags a Negative response from the webhook error.

Webhook Response Contract:
namespace SitecoreAI.Dataverse.Functions.Models;

public sealed record SitecoreWebhookResponse(
    [property: JsonPropertyName("isSuccessful")] bool IsSuccessful,
    [property: JsonPropertyName("message")] string Message,
    [property: JsonPropertyName("recordId")] Guid? RecordId = null,
    [property: JsonPropertyName("correlationId")] string? CorrelationId = null
);

Full Repository & Source Code

📱 Scan to access the complete SitecoreAI Dataverse Azure Functions repository
💡 If you want to review the full .NET Isolated implementation, request models, and function bindings, check out the complete project on GitHub:



Share your feedback or contribute to support the Sitecore developer community!


Front-End Headless Application Codebase

To see how the Next.js headless rendering host, environment variables (SITECORE_EDGE_CONTEXT_ID), and form styling are configured on the front-end, explore the full application repository on GitHub:

👉 AmitKumar-AK/sitecore-ai-codebase on GitHub

🌟 Support the Community: Feel free to star the repo, raise issues, submit PRs, or share your feedback to help improve this resource for the Sitecore developer community!


5. 📝 Configure the SitecoreAI Enquiry Form & Webhook


✍️ Step 1: Create Form Fields

  1. Navigate to SitecoreAI ➡ Design ➡ Forms.

  2. Add input fields with matching keys:

    • txt_fullName (Single Line Text)

    • txt_Email (Email Address)

    • txtArea_enquiry (Multi-line Text)

    • list_feedbacktype (Dropdown / Choice)

    Create SitecoreAI Form

🔗 Step 2: Register the Webhook

  1. Go to Form SettingsManage WebhooksAdd Webhook.

  2. Select API Key authentication.

  3. Configure the following values:

  4. Save the Webhook.

Overview of SitecoreAI Webhooks

Webhooks in SitecoreAI Forms define the destination endpoint for form submission data. They allow you to route submitted form payloads directly to external endpoints, third-party services, or serverless backends like Azure Functions

🔗 Webhook Setup Guide: SitecoreAI Forms - Create a Webhook

🧪 Step 3: Test Webhook Connectivity

Click Test Webhook from the form settings dialog to verify payload serialization:

{
  "isSuccessful": true,
  "responseContent": "{\"Success\":true,\"Message\":\"Dataverse record created successfully.\",\"Data\":{\"id\":\"7634bbee-2996-f111-8075-70a8a5af01f4\"}}"
}

6. 📄 Place and Activate the Form in Page Builder


  1. In SitecoreAI, open the target page within Page Builder.

  2. Drag and drop the Form Component into the designated layout placeholder.

  3. Select your newly configured Enquiry form from the properties panel.

  4. Configure post-submit feedback (e.g., Thank you! Your enquiry has been received.).

  5. Publish the page.

Overview of Submit Actions

In SitecoreAI Forms, Submit Actions define the user experience and post-submission behavior immediately after a website visitor submits a form. This determines what visual feedback the visitor sees or where they are navigated next upon successful or unsuccessful processing.

🔗 Submit Actions Guide: SitecoreAI Submit Actions Guide

Enable Forms in SitecoreAI Page Builder

After designing and activating your form, place it onto target pages using SitecoreAI Page Builder. [cite_start]This configuration walkthrough covers prerequisite front-end Headless SDK checks, placeholder rendering permissions, and site activation scopes required to render the Form component seamlessly

🔗 For comprehensive prerequisites and troubleshooting guidance: SitecoreAI Page Builder

7. 🗄️ Verifying Records in Microsoft Dataverse


Submit a live enquiry from the published webpage, then verify the record in Power Apps:

  1. Open the page where SitecoreAI form added

  2. Enter the required details and submit the form.

  3. The form displays the configured success message and No negative webhook response is shown.

  4. The payload contains the expected field keys.

  5. Open Power Apps Studio .

  6. Navigate to TablesSitecore Enquiries.

  7. Confirm that the new row exists with all columns mapped properly.

🛡️ Best Practices & Security Summary

  • Zero Direct Access: Dataverse is completely decoupled from the public frontend.

  • Least Privilege: Entra Application User has access only to specific Dataverse tables.

  • Separation of Concerns: Forms use POST-only keys; internal tools access GET endpoints via separate credentials.

  • MCP Readiness: Clean input/output contracts enable straightforward exposure as Model Context Protocol (MCP) tools for enterprise AI agents.


💬 Frequently Asked Questions (FAQs)


Yes. A SitecoreAI webhook can use an HTTP-triggered Azure Function as its destination.

For a basic Function-key integration, use API key authentication with the x-functions-key header. For more advanced governance, use OAuth 2 or Azure API Management.

It allows the receiving endpoint to identify a SitecoreAI test and avoid writing test data to production systems.

Required values from local.settings.json may not have been configured as Azure Function App settings.

A public form normally needs create access only. Protect the GET endpoint for authorised internal applications, administration tools or future MCP tooling.

Yes. The Functions provide focused business operations that an MCP server can expose as controlled tools.

📚 Summary


In this article, we deployed the Dataverse Azure Functions to Azure and connected a SitecoreAI form through a secure webhook. The form now creates Dataverse records without exposing Dataverse credentials or implementation details to the frontend. We also added a protected GET operation to retrieve enquiry records for authorised callers.

The final architecture is

SitecoreAI captures the data, Azure Functions enforce the business contract, and Microsoft Dataverse stores the record.

🧾Credit/References

View All

This article is part of a series:   SitecoreAI and Microsoft Dataverse Integration
comments powered by Disqus
All posts