# Solving Dynamics 365 — Integration guides, full text > A practical reference for Microsoft Dynamics 365, Business Central, and the Microsoft business apps ecosystem — guides, comparisons, pricing, troubleshooting, and a glossary. 72 guides in this category. Author: Emil Björk, Microsoft business apps consultant, Gothenburg. Site index: https://www.solvingdynamics365.com/llms.txt. Every guide, every category: https://www.solvingdynamics365.com/llms-full.txt. --- # Anti-corruption layers for Dynamics 365 integrations How anti-corruption layers protect Dynamics 365 from external system model leakage — translation patterns, when to apply ACL, and the maintenance discipline. Source: https://www.solvingdynamics365.com/guides/anti-corruption-layers-with-dynamics-365 Section: Integrations / Architecture patterns Published: 2026-05-01 Updated: 2026-08-25 When Dynamics 365 integrates with external systems, those systems have their own domain models, terminology, and quirks. Without intentional design, those external models leak into Dynamics — concepts named oddly, fields that don't match Dynamics's semantics, business logic intertwined. An **anti-corruption layer (ACL)** is the architectural pattern that prevents this leakage: a translation boundary that lets each side keep its own model clean. **The problem.** - External system A uses "Account" for what Dynamics calls "Customer." - External system B has status codes "1, 2, 3, X, Y" with non-obvious meaning. - External system C's date format differs. - Each is a small thing; together they corrupt the model. Without ACL, Dynamics ends up with foreign concepts; future maintenance pays the cost. **What an ACL provides.** - **Translation** — external concepts mapped to Dynamics concepts. - **Isolation** — external system changes don't ripple into Dynamics. - **Defensive validation** — external data validated before crossing. - **Abstraction** — Dynamics doesn't depend on external's specifics. The investment is real; the long-term maintenance benefit is greater. **Where to put the ACL.** - **Azure Function** — common Microsoft pattern. - **Logic App** — for some scenarios. - **Custom service** in App Service. - **API Management policies** — for inbound translation. - **Plug-in** — for simple cases. For complex translations, dedicated services typically. **ACL responsibilities.** - **Receive** external system data. - **Validate** — required fields, formats. - **Translate** — to Dynamics model. - **Enrich** — add Dynamics-specific defaults. - **Forward** — to Dynamics API. - **Translate response** back if needed. The same in reverse for outbound. **Translation patterns.** - **Field mapping** — `external.CustomerId → dynamics.AccountNumber`. - **Value mapping** — `external.Status "1" → dynamics.statecode 0`. - **Structural transformation** — flatten / unflatten. - **Lookup translation** — `external.CountryCode "US" → dynamics.Country reference`. Each translation is a documented rule. **Validation rules.** - **Required fields present.** - **Format valid** — email, date, numbers. - **Value ranges** — within expected. - **Business rules** — domain validation. Catch problems at the boundary; Dynamics doesn't process bad data. **Bidirectional ACL.** - Inbound translation (external → Dynamics). - Outbound translation (Dynamics → external). - Both managed in the ACL. Symmetric translation; consistent model isolation. **When ACL pays back.** - **Integration with legacy systems** — old systems have unique models. - **Multiple similar external systems** — multiple insurers, multiple banks; each slightly different. - **External systems that change frequently** — ACL absorbs the change. - **Different teams own each system** — ACL is the contract boundary. **When ACL is overkill.** - **Simple, well-defined integration** — direct mapping suffices. - **One-time data migration** — overhead exceeds benefit. - **Low volume** — manual quirks tolerable. For most production integrations, some ACL exists even if minimal. **Implementation example.** External system "ProductFulfillment" sends shipments to Dynamics: ``` External payload: { "shipRef": "SHIP-12345", "soNum": "SO-99", "stat": "S", "shipDate": "20261110" } ``` Translated to Dynamics: ``` { "shipmentTrackingNumber": "SHIP-12345", "salesOrderId": "lookup-by-name(SO-99)", "statusCode": 3, // Shipped "shipmentDate": "2026-11-10T00:00:00Z" } ``` The ACL does this translation; Dynamics never sees the foreign vocabulary. ## Schema versioning External system schemas evolve: - ACL versioned independently. - Multiple versions can coexist. - Migration window for upstream callers. Versioning enables schema evolution without breaking consumers. **Error handling at ACL.** - **Validation errors** — return to source; not propagated. - **Translation errors** — log and alert; retry or dead-letter. - **Dynamics errors** — translated back to source-friendly message. The ACL prevents cryptic errors from reaching either side. **Monitoring ACL health.** - **Throughput** — messages translated. - **Validation failures** — what's coming in bad. - **Latency** — translation time. - **Errors** — type and rate. Standard observability; treats ACL as production service. **Common pitfalls.** - **No ACL.** External model leaks into Dynamics; foreign concepts proliferate. - **ACL as thin pass-through.** Doesn't translate; just forwards. No protection. - **Hard-coded mappings.** Should be configuration; making changes requires code. - **No validation.** Bad data reaches Dynamics. - **Stateful ACL.** State should typically live in Dynamics or external; ACL is stateless translation. - **Performance bottleneck.** Heavy translation becomes throughput limit. **Patterns and frameworks.** - **AutoMapper** (.NET) — declarative object mapping. - **JSONata** — JSON transformation language. - **JOLT** — Java-based. - **Custom in TypeScript / C#** — full control. Choose based on team skill and translation complexity. **Testing.** - **Unit tests** — translation correctness. - **Property-based tests** — round-trip preservation. - **Integration tests** — with real external system. - **Performance tests** — high-volume. ACL is critical infrastructure; test like it. **Documentation.** - **Field mapping** documented. - **Value mappings** referenced. - **Validation rules** explicit. - **Error meanings** explained. Documentation enables maintenance years later. ## Strategic positioning Anti-corruption layers represent architectural maturity. Teams new to integration often skip ACL — direct mappings seem simpler. Teams with experience know the long-term cost of model leakage; they invest in ACL upfront. For architects: - Identify boundaries where ACL matters. - Choose appropriate technology per boundary. - Build versioning and observability. - Document translations. The investment pays back through: - Cleaner Dynamics model. - External system changes absorbed. - Easier debugging. - Lower maintenance over years. Not every integration needs heavy ACL; every meaningful integration benefits from some level of intentional translation boundary. Design for the long term. --- # API Gateway patterns for Dynamics 365 How API gateways enhance Dynamics 365 integration architecture — Azure API Management, security, rate limiting, transformation. Source: https://www.solvingdynamics365.com/guides/api-gateway-patterns-for-dynamics-365 Section: Integrations / Architecture patterns Published: 2026-05-01 Updated: 2026-08-25 When many consumers integrate with Dynamics 365 — or when Dynamics needs to expose APIs externally — an **API Gateway** sits in front of the actual APIs to provide cross-cutting concerns: authentication, rate limiting, transformation, logging, versioning. **Azure API Management (APIM)** is Microsoft's offering; for serious Dynamics integration architectures, an API gateway is foundational infrastructure. **What an API gateway does.** - **Authentication / authorisation** — verify caller identity. - **Rate limiting** — protect backend from overload. - **Request / response transformation** — adapt formats. - **Caching** — reduce backend load. - **Logging and analytics** — visibility. - **Routing** — direct traffic to appropriate backend. - **Versioning** — multiple API versions coexist. The gateway centralises these concerns; backends focus on business logic. **Why for Dynamics 365.** - **Standardise external API access** to Dataverse. - **Hide multiple backends** — Dataverse + F&O + custom services behind one façade. - **Security boundary** — additional defense layer. - **Throttle protection** — prevent overwhelming Dataverse limits. - **Developer experience** — discoverable, documented APIs. **Azure API Management (APIM).** - **Developer portal** — API documentation, testing. - **Policies** — declarative request / response handling. - **Products** — group APIs for consumers. - **Subscriptions** — per-consumer keys. - **Backends** — connections to actual API sources. - **Versions and revisions** — version management. Mature product; widely used. **Common patterns.** ## API façade Multiple backends, one external API: - External consumers see unified API. - Gateway routes to appropriate backend. - Backend complexity hidden. For Dynamics + F&O + custom services, single external API simplifies consumer experience. ## Throttling Protect Dataverse: - Gateway limits caller to N requests / minute. - Aggregated across all calls. - 429 returned when exceeded. Dataverse has its own throttling; gateway adds tenant-level throttle and queue management. ## Transformation Adapt request / response: - External format vs Dataverse format. - Add / remove fields. - Reformat dates, currencies. - Inject defaults. Reduces backend complexity; clients see clean API. ## Caching Frequently-read data: - Cache response at gateway. - Subsequent calls served from cache. - TTL configured. For read-heavy reference data (product catalog, country list), dramatically reduces Dataverse load. **Security policies.** - **OAuth 2.0** — token validation. - **IP filtering.** - **Client certificate authentication.** - **JWT validation** — claims-based access. Each policy at gateway level; backend doesn't reimplement. **Versioning.** - **v1** API endpoint. - **v2** updated API. - Both coexist; consumers migrate gradually. Without versioning, breaking changes break consumers; with, smooth evolution. **Backend mapping.** - **Dataverse** — OData API endpoint. - **F&O** — data entities OData endpoint. - **Custom services** — Azure Functions, App Services. - **External APIs** — third-party services. Gateway abstracts which backend; routing logic per request. **Developer portal.** - Self-service API documentation. - Try-it-out console. - API key generation. - Usage analytics per developer. For external developer ecosystems, the developer portal is the front door. **Monitoring at gateway.** - Per-API request volume. - Latency distribution. - Error rate. - Per-consumer usage. Centralised observability for all API traffic. **Common APIM policies.** ```xml api://my-api ``` Policies declarative; powerful at expressing common patterns. **Multi-tenant scenarios.** - ISVs serving multiple customers via single gateway. - Per-tenant routing. - Tenant-isolated rate limits. - Tenant-specific transformations. The gateway handles multi-tenancy without backend complexity. **Pricing considerations.** - APIM Pricing tiered (Consumption, Developer, Basic, Standard, Premium). - Premium for enterprise scale. - Cost vs benefit modelling. For high-volume APIs, Premium tier necessary. **Comparison with direct Dataverse API.** - **Direct** — simple, less control, no transformation. - **Gateway-mediated** — more setup, more control, more observability. Direct API fine for internal apps and Power Platform. Gateway for external consumers, multi-system façade, security perimeter. **Common pitfalls.** - **Gateway as just passthrough.** Adds latency without value. - **Heavy transformation logic at gateway.** Should be in business logic layer. - **No documentation.** Developer portal empty; adoption low. - **No versioning.** Breaking changes propagate. - **Rate limits wrong.** Too restrictive frustrates; too loose lets abuse through. - **Authentication misconfigured.** Authorised callers blocked or unauthorised allowed. **Best practices.** - **Document everything** — schema, examples, errors. - **Version from day one.** - **Standardised error responses.** - **Comprehensive monitoring.** - **Caching where data permits.** - **Security policies tested.** - **Performance tested.** **Alternative: Power Platform's connectors as gateway.** - For Power Platform-only consumers, custom connectors serve similar purpose. - Less for external consumers. APIM is broader; custom connectors more Power Platform-specific. ## Strategic positioning API Management is the modern way to expose Dynamics 365 APIs to external consumers and to integrate multiple backends behind a unified façade. The investment in APIM setup pays back through: - Cleaner consumer experience. - Centralised security and rate limiting. - Better observability. - Easier evolution. For organisations with multiple consumers of Dynamics APIs, multiple backend systems, or aspirations to expose APIs externally (B2B, partner ecosystems), API Gateway is essential infrastructure. Skip it and you'll end up reinventing pieces poorly across multiple integrations. --- # Azure API Management in front of Dataverse How API Management acts as a façade for Dynamics 365 APIs — rate limiting, authentication, transformation, observability, and developer portal. Source: https://www.solvingdynamics365.com/guides/apim-in-front-of-dataverse Section: Integrations / API & identity Published: 2026-08-01 Updated: 2026-08-25 When Dynamics 365 APIs are consumed by many external systems — partners, mobile apps, internal applications, third-party integrations — exposing them directly creates governance, security, and operational problems. **[Azure API Management (APIM)](https://www.solvingdynamics365.com/glossary/api-management)** is the standard pattern for a managed API gateway sitting in front of Dynamics 365, adding rate limiting, authentication, transformation, observability, and a developer portal. **What APIM provides.** - **Single endpoint** — partners hit `api.contoso.com/dynamics/...` instead of `contoso.crm.dynamics.com/api/data/v9.2/...`. Decoupling. - **Authentication** — APIM verifies API keys, subscription tokens, or OAuth tokens. Dataverse never sees unauthenticated traffic. - **Rate limiting** — quotas per consumer; protects Dataverse from runaway clients. - **Transformation** — request / response shape can be transformed; consumers don't need to handle Dataverse-specific quirks. - **Caching** — read-heavy responses cached at the gateway; reduces Dataverse load. - **Versioning** — multiple API versions exposed; deprecation managed. - **Observability** — every request logged with metadata; analytics across all consumers. - **Developer portal** — auto-generated documentation, API key issuance, self-service for partner developers. **Architecture.** ``` External consumers → APIM → Dataverse (Web API) ``` APIM authenticates the consumer (subscription key, OAuth), applies policies (rate limit, transformation), and forwards to Dataverse with a service-principal access token. Dataverse only sees authenticated, vetted traffic from APIM. ## Policy-driven configuration APIM's behaviour is defined by **policies** — XML configuration that runs at request time. Common policies: - **`set-backend-service`** — direct the request to Dataverse. - **`set-header`** — add Authorization headers with service-principal tokens. - **`rate-limit-by-key`** — N requests per minute per consumer. - **`quota-by-key`** — N total requests per consumer per month. - **`cache-store` / `cache-lookup`** — cache responses. - **`set-body`** — transform the request or response. - **`json-to-xml` / `xml-to-json`** — format conversion if needed. - **`validate-jwt`** — verify OAuth JWT tokens. - **`return-response`** — short-circuit with a custom response (e.g. mock data). Policies are applied per API operation or globally per product. **Products and subscriptions.** - **Products** — bundles of APIs offered as a unit. "Partner API" might include Customer / Order / Invoice operations. - **Subscriptions** — issued to consumers; ties a consumer to a product. Each subscription has a unique key. - **Consumers** — partners, internal apps, third-party developers. Each has subscriptions to one or more products. This structure lets you: - Issue different API products to different partners. - Apply different rate limits / pricing per product. - Track usage per consumer. **Authentication patterns.** - **API key per consumer** — simplest; key in a header (`Ocp-Apim-Subscription-Key`). - **OAuth 2.0** — for human-end-user scenarios; APIM validates the JWT. - **Mutual TLS** — for high-security partner scenarios. APIM provides identity-provider integration through OpenID Connect and OAuth flows; configurable per product. **Rate limiting strategy.** - **Per-consumer limits** — different partners get different quotas based on contract. - **Per-operation limits** — write-heavy operations might be more limited than read operations. - **Burst vs sustained** — allow bursts (e.g. 100 calls in 10 seconds) within longer-term sustained limits (e.g. 10,000 per day). Rate limiting protects Dataverse from being overwhelmed and produces predictable performance for all consumers. **Caching.** For read-heavy APIs, caching dramatically reduces Dataverse load. APIM caches responses based on URL and query parameters: - **Read operations** — cache for 5 minutes / 1 hour / as appropriate. - **Cache invalidation** — based on TTL; can be triggered explicitly for mutations. - **User-specific caching** — cache per user via the cache key. Cached responses serve at gateway speed; Dataverse never sees the request. ## Developer portal APIM auto-generates a developer portal with: - API documentation derived from OpenAPI specs. - Interactive "try it" pages for testing operations. - API key self-service issuance. - Quotas and usage dashboards per consumer. Partners and internal developers use the portal as their starting point. **Observability.** - **Per-request logging** — every call logged with timing, status, consumer. - **Application Insights integration** — APIM streams telemetry to App Insights. - **Diagnostic logs** — Azure Monitor logs for compliance and debugging. The data answers: who's using which APIs, how fast, with what error rates. ## Cost APIM is billed by tier (Developer, Basic, Standard, Premium) — fixed monthly cost based on capacity. Sized for expected traffic. **Limits.** - **APIM is a managed service with capacity limits per tier** — exceed tier capacity, requests slow or fail. Scale up tier or use multiple APIM instances. - **Policy complexity** — overly complex policies slow request processing. - **Maintenance** — APIM versions update periodically; configurations need adaptation. **When to use APIM.** - **Multi-tenant API exposure** — many consumers with different access levels. - **Partner API programmes** — public-ish APIs with developer onboarding. - **High-volume integrations** — protection and observability matter. - **Compliance-driven scenarios** — audit, rate-limit, authentication centrally enforced. ## When not For single-consumer integrations or internal-only APIs with simple authentication, APIM may be overkill. Direct Dataverse calls suffice. ## Operational reality APIM is enterprise-grade infrastructure. Plan for it deliberately; staff with someone who knows the platform; treat it as production. Done well, it's the API governance layer that makes large-scale Dynamics 365 integration sustainable. --- # Azure Data Factory with Dynamics 365 How to use Azure Data Factory for Dynamics 365 data integration — connectors, common patterns, performance tuning. Source: https://www.solvingdynamics365.com/guides/azure-data-factory-with-dynamics-365 Section: Integrations / Azure services Published: 2026-05-01 Updated: 2026-08-25 **Azure Data Factory (ADF)** is Microsoft's cloud-native ETL/ELT platform. For Dynamics 365 customers, ADF is one of several options for data movement — to and from Dataverse, F&O, and across hybrid scenarios. Understanding when ADF wins (and when other tools win) is foundational for designing the right integration architecture. **What ADF provides.** - **Connectors** to 90+ sources — Dataverse, F&O, SQL, Synapse, files, APIs. - **Pipelines** — orchestrated workflows of data movement and transformation. - **Mapping data flows** — visual transformation logic. - **Triggers** — schedule, event-based, manual. - **Monitoring** — pipeline runs, errors, performance. - **Integration with Azure DevOps / Git** — pipeline definitions in code. It's a comprehensive platform — large investment, large capability. **Connectors for Dynamics 365.** - **Dataverse connector** — read and write to Dataverse tables. - **Common Data Service (legacy)** — deprecated; Dataverse connector is current. - **D365 Finance and Operations connector** — read F&O data entities. - **Generic OData connector** — fallback for entities not in dedicated connector. For F&O, the data entity model is the integration surface; ADF connects via the OData endpoint or direct database access in specific patterns. **Pipeline patterns.** - **Daily full refresh** — read everything from source, write to destination. - **Incremental** — only changed records since last run; uses last-modified-date or change tracking. - **Bulk historical migration** — one-time large load. - **Continuous replication** — frequent small batches. Incremental is the dominant pattern for ongoing integrations; full refresh is for small data or where change tracking isn't available. **Common scenarios.** - **Dataverse → data lake** for analytics (alongside or instead of Synapse Link). - **F&O → data warehouse** for reporting. - **External SQL → Dataverse** for master data sync. - **Files (CSV, JSON, Parquet) → F&O** for migrations. - **Dataverse → SQL** for cross-application analytics. **Performance tuning.** - **Parallel copies** — multiple data partitions read concurrently. - **Compute scale** — Integration Runtime size (DIUs). - **Filtering at source** — push filters down rather than pulling all then filtering. - **Compression** — Parquet vs CSV; orders of magnitude smaller and faster. - **Batch sizes** — tune insert/update batch sizes for destination performance. A well-tuned pipeline can move millions of rows per minute; poorly tuned can take hours. **Authentication.** - **Managed Identity** — preferred; ADF runs with a managed identity, granted access to sources. - **Service Principal** — when managed identity isn't applicable. - **Linked services with credentials** — for SQL connections. Managed identity eliminates secrets — major security advantage. ## Mapping data flows Visual transformation: - Filter, aggregate, join, pivot. - Conditional split. - Surrogate key generation. - Slowly Changing Dimension handling. Behind the scenes, mapping data flows run on Azure Databricks; performance depends on cluster sizing. **Comparison with alternatives.** | Tool | Strengths | Weaknesses | |---|---|---| | **ADF** | Comprehensive, scalable, code-first | Setup complexity, cost | | **Power Automate** | Simple, low-code | Limited scale, throttling | | **Synapse Link** | Real-time Dataverse → Synapse | One-way, less flexible | | **Fabric Pipelines** | Newer, Fabric-integrated | Less mature than ADF | | **DMF (in F&O)** | F&O-native | F&O-only | | **Custom code** | Total flexibility | Maintenance burden | For high-volume, complex, scheduled integrations: ADF. For low-volume reactive integrations: Power Automate. For real-time analytics replication: Synapse Link / Fabric Link. ## Cost ADF pricing: - **Per pipeline run** — small charge. - **Per activity execution** — depends on activity type. - **Compute time** — for data flows and integration runtimes. - **Data movement DIUs** — for copy operations. High-volume daily runs can be tens of dollars per day. Budget and monitor. ## Source control ADF pipelines as JSON in git: - Pipeline definitions reviewable. - Environment promotion via Azure DevOps releases or GitHub Actions. - Branch-based development. Mature ADF deployments treat pipelines as code, not as artifacts edited in the portal. **Error handling.** - **Activity-level retry** — automatic retries with backoff. - **Failure paths** — pipeline branches on success/failure. - **Email / Teams notifications** — alerts on failure. - **Logging** — to Log Analytics for centralised observability. Robust pipelines handle expected failure modes (transient errors, downstream throttling) and alert on unexpected. **Common pitfalls.** - **No incremental logic.** Full refresh daily; expensive and slow. - **No watermarking.** Incremental logic without proper checkpointing; data missed or duplicated. - **Hardcoded credentials.** Stored in linked services; security risk. - **No alerting.** Pipeline silently fails; data integration broken for days. - **Source schema changes.** Source adds column; pipeline fails. Schema-on-read patterns help. - **Performance unoptimized.** Default settings; slow operations; high cost. ## Integration with Microsoft Fabric Fabric pipelines (the spiritual successor to ADF) are emerging: - Built into Fabric. - Same conceptual model as ADF. - Better integration with Lakehouse / Warehouse. - More limited capability initially; closing the gap. For new Fabric-centric deployments, Fabric pipelines may be preferred; for existing ADF investments, no urgency to migrate. ## Strategic positioning ADF is the workhorse for serious data integration in Microsoft's cloud. For Dynamics 365 customers, it's the right tool for high-volume, complex, scheduled integrations between Dynamics and other systems. The investment in setup pays back through reliability and scale; the cost is real but manageable. Most enterprise Dynamics 365 deployments end up with significant ADF footprint — it's an architectural pillar of the integration story. --- # Azure Functions for Dynamics 365 integrations How to use Azure Functions to extend and integrate Dynamics 365 — patterns, authentication, lifecycle, performance, and the trade-offs vs Power Automate. Source: https://www.solvingdynamics365.com/guides/azure-functions-for-dynamics-365 Section: Integrations / Azure services Published: 2026-07-30 Updated: 2026-08-25 When low-code (Power Automate, Logic Apps) doesn't fit, Azure Functions are the next-step compute platform for Dynamics 365 integrations and extensions. They're code (typically C#, JavaScript, Python, PowerShell), they run on demand without server management, and they integrate cleanly with the broader Azure and Microsoft cloud ecosystem. **When to reach for Azure Functions.** - **Complex transformations** that Power Automate can't express cleanly — recursive logic, complex string parsing, integration with libraries. - **High-throughput** scenarios where Power Automate's per-action cost or throughput doesn't fit. - **Custom connectors** beyond what platform connectors provide. - **Webhook receivers** for external systems pushing events. - **Scheduled batch jobs** that need substantial compute. - **Background workers** consuming Service Bus / queue messages. - **API façades** in front of Dataverse for partner consumption. ## Triggers Functions are triggered by events: - **HTTP** — function exposed at a URL; called via REST. The most common for integration scenarios. - **Timer** — runs on a schedule. Replaces "Scheduled Tasks" running in legacy infrastructure. - **Queue / Service Bus** — runs when a message arrives. Used for asynchronous processing of events from Dataverse. - **Event Grid** — runs on Event Grid events. - **Blob Storage** — runs when a blob is created or modified. - **Cosmos DB** — runs on document changes. For Dynamics 365 integrations: - **HTTP-triggered functions** receive webhook calls from Dataverse, Business Central, or external systems. - **Service Bus-triggered functions** consume events from Dataverse's Service Bus integration. - **Timer-triggered functions** run periodic exports / imports. **Authentication.** To call Dataverse from a Function: - **Microsoft Entra ID app registration** — the Function authenticates as a service principal. - **Managed Identity** — if the Function is hosted in Azure, use Azure Managed Identity for credential-free authentication to Dataverse. - **OAuth 2.0 client credentials** flow — exchange client ID + secret for access token; use token in Dataverse API calls. The Dataverse SDK for .NET handles this in straightforward code; for other languages, use HTTP client libraries with appropriate token handling. **Calling Dataverse from a Function.** ```csharp // C# example using Dataverse SDK var serviceClient = new ServiceClient( new Uri("https://contoso.crm.dynamics.com"), clientId, clientSecret, true); var customer = await serviceClient.RetrieveAsync( "account", new Guid("..."), new ColumnSet("name", "telephone1")); ``` **Receiving webhook from Dataverse.** ```csharp [FunctionName("DataverseWebhook")] public static async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post")] HttpRequest req, ILogger log) { var body = await new StreamReader(req.Body).ReadToEndAsync(); // body contains Dataverse's notification payload // Process the change return new OkResult(); } ``` The function URL is registered as a webhook subscription target in Dataverse. ## Hosting plans Azure Functions have multiple hosting tiers: - **Consumption** — pay-per-execution; auto-scale to zero; cold starts. Good for low-volume / sporadic workloads. - **Premium** — pre-warmed instances; no cold starts; VNET integration. Good for production with consistent traffic. - **Dedicated (App Service Plan)** — like running on a regular App Service; predictable cost; no per-execution scaling. Good for very high or very steady workloads. For most Dynamics 365 integration scenarios, Consumption or Premium is appropriate. **Performance.** - **Cold starts** — Consumption Functions starting from idle take 1-5 seconds. Premium pre-warmed instances eliminate. - **Concurrent execution** — Functions scale automatically; many concurrent executions of the same function are normal. - **Throttling** — Dataverse has API rate limits; high-throughput Functions need to handle 429 responses with exponential backoff. **Monitoring.** - **Application Insights integration** — automatic for Functions. Trace messages, exception logs, performance metrics, request rates. - **Function execution history** — visible in the Azure portal. - **Custom telemetry** — log structured events for richer analysis. **Patterns and examples.** - **Webhook-to-record-update** — Dataverse changes notify a webhook; Function processes and updates external system. - **Periodic data sync** — Timer-triggered Function pulls from external API and writes to Dataverse. - **Event-driven processor** — Service Bus-triggered Function consumes events; processes; writes results back. - **API façade** — HTTP-triggered Function exposes a curated API in front of Dataverse for partner consumption. - **Validation service** — Function called from a Power Automate flow; validates complex business rules; returns yes/no. **Cost.** - **Consumption** — free up to a generous tier, then very inexpensive per execution. Most Dynamics 365 integration scenarios run in the cheap zone. - **Premium / Dedicated** — fixed monthly cost; predictable. **Limits.** - **Function execution time** — Consumption limits at 5–10 minutes; Premium / Dedicated can be longer. - **Memory** — Consumption ~1.5GB; Premium more. - **Connections** — outbound connection limits per Function App. **Common pitfalls.** - **Long-running operations** — Functions aren't for hours-long work; use Durable Functions or Logic Apps. - **Cold start in user-facing scenarios** — Consumption cold starts can frustrate; use Premium. - **No structured logging** — debugging without proper logs is brutal. - **Hard-coded credentials** — store in Azure Key Vault. ## Operational reality Azure Functions are the workhorse for code-grade Dynamics 365 integration. Choose them when low-code tools don't fit; use the platform features (App Insights, Key Vault, Managed Identity) consistently; treat each Function App as a proper production deployment with CI/CD, monitoring, and ALM. --- # Azure Service Bus integration with Dataverse How Dataverse publishes change events to Azure Service Bus — registration, message format, queues vs topics, and resilient consumer patterns. Source: https://www.solvingdynamics365.com/guides/azure-service-bus-integration-with-dataverse Section: Integrations / Azure services Published: 2026-05-01 Updated: 2026-08-25 ### Key facts - A queue is point-to-point, delivered to one consumer at a time, while a topic publishes to multiple subscribers who each get their own copy — pick a queue when one system handles each change and a topic when several systems care about it. - Registration can be synchronous or asynchronous, and asynchronous is overwhelmingly the right choice, since synchronous publication couples Dataverse's own availability to Service Bus availability. - Messages persist in the queue for a configurable retention window that defaults to 14 days, and failed processing returns a message to the queue or, after configurable retry limits, to a dead-letter queue for investigation. - Service Bus standard tier handles hundreds of messages per second, while premium tier handles many thousands, so capacity needs planning against expected Dataverse change volume. - Compared with the alternatives, Service Bus is durable and ordered for transactional integration, Event Grid suits high-volume fan-out to many subscribers, and webhooks suit low-volume real-time cases where the consumer can tolerate limited retries. **Service Bus integration** is one of Dataverse's most enterprise-friendly outbound integration mechanisms. When Dataverse changes a record, it publishes a message to an Azure Service Bus queue or topic; downstream consumers process the message at their own pace, with durable retention and built-in retry. For high-volume, async, decoupled integrations, this is the right pattern. **The architecture.** 1. A Dataverse record changes (Create, Update, Delete, etc.). 2. A configured **Service endpoint** of type Service Bus catches the event. 3. Dataverse serialises the relevant record context (target entity, attribute changes, before/after images) into a Service Bus message. 4. The message is published to a Service Bus queue or topic. 5. One or more downstream consumers — Azure Functions, custom code in a VM, Logic Apps, third-party services — read from the queue/topic and process. **Queues vs topics.** - **Queue** — point-to-point: one publisher, one consumer (or one consumer at a time). The consumer reads and the message is removed. - **Topic** — publisher with multiple subscribers: each subscriber gets its own copy. Useful when several systems should be notified of the same change. Choose queue when one system handles each change. Choose topic when multiple systems care about the same change. ## Registration Service Bus integration is configured through the **Plug-in Registration Tool** (legacy but still functional) or through programmatic registration. The configuration includes: connection string to the Service Bus namespace, queue/topic name, message format (XML or JSON), and which Dataverse messages and entities trigger publication. Registration can be **synchronous** (block the Dataverse operation until the message is published) or **asynchronous** (queue locally and publish on the async service queue). Asynchronous registration is overwhelmingly the right choice — synchronous Service Bus publication couples Dataverse availability to Service Bus availability. ## Message format Dataverse publishes either: - **Entity image** — a snapshot of the changed record including pre-image and post-image attributes. - **Execution context** — the full context (message, entity, target, user, parameters, etc.) serialised as XML/JSON. Most consumers want the execution context for flexibility — they can determine what changed and act on it. **Consumer patterns.** - **Azure Functions** — serverless: trigger on queue message, scale out, process, ack. The most common pattern. - **Logic Apps** — trigger on Service Bus message, orchestrate downstream steps with retry and error handling. - **Custom services** — long-running consumers in App Service, AKS, VMs. - **Third-party SaaS** — many SaaS products consume Service Bus messages natively. ## Resilience Service Bus is the answer when consumers cannot be assumed always-on. Messages persist in the queue for up to a configurable retention window (defaults to 14 days, max much longer). Failed processing returns the message to the queue (or to a **dead-letter queue (DLQ)** after configurable retry limits) for later investigation. Dataverse fire-and-forgets; the queue is the durability layer. ## Throughput Service Bus standard tier handles hundreds of messages per second; premium handles many thousands. Plan capacity against expected Dataverse change volume. **Vs Event Grid / Webhooks.** - **Service Bus** — durable, ordered, point-to-point or pub/sub at moderate scale. The right choice for transactional integration. - **Event Grid** — high-volume fan-out at scale, lightweight. The right choice for many subscribers wanting near-real-time events. - **Webhooks** — direct HTTP POST, simpler, no retry beyond a few attempts. The right choice for low-volume real-time and tolerant consumers. For Dynamics 365 enterprise integrations with serious volume and reliability requirements, Service Bus is the canonical default. ## Where to go next Making the publish side reliable is [the outbox pattern](https://www.solvingdynamics365.com/guides/the-outbox-pattern-with-service-bus); making the consume side reliable is [message replay and poison queue handling](https://www.solvingdynamics365.com/guides/message-replay-and-poison-queue-handling-for-d365). The alternatives are compared in [webhooks vs events](https://www.solvingdynamics365.com/guides/webhooks-vs-events-in-dataverse) and [Event Grid with Dataverse](https://www.solvingdynamics365.com/guides/event-grid-with-dataverse); the Business Central equivalent is [webhooks vs Service Bus](https://www.solvingdynamics365.com/guides/integrating-business-central-webhooks-vs-service-bus). --- # Azure Synapse Link for Dataverse How Synapse Link replicates Dataverse data to Azure Data Lake Storage continuously — architecture, configuration, query patterns. Source: https://www.solvingdynamics365.com/guides/azure-synapse-link-for-dataverse Section: Integrations / Azure services Published: 2026-05-01 Updated: 2026-08-25 ### Key facts - Synapse Link replicates Dataverse changes to Azure Data Lake Storage continuously rather than on a nightly batch, landing an initial bulk copy followed by change-tracking-based updates roughly every 15 minutes or more. - Delta Parquet is the modern storage format choice over CSV, offering columnar storage, schema-on-write, and queryability as a Delta Lake table. - Fabric Link for Dataverse is the Microsoft Fabric-native successor, replicating to OneLake instead of ADLS and supporting Direct Lake mode for Power BI without an import step; new deployments should default to it. - Replicated data in the lake bypasses Dataverse's row-level security entirely — lake security is file, folder, or container based, so sensitive tables need separate restricted containers or column-level masking. - Not every table needs replication: system tables like audit and async operations are usually skipped, since each replicated table costs storage and compute and a full-replication default balloons both. For analytical workloads against Dataverse data, the historical answer was nightly ETL via ADF or pulling data through the Dataverse API into a warehouse. **Azure Synapse Link for Dataverse** offered a better answer: continuous, low-latency replication of Dataverse changes to Azure Data Lake Storage (ADLS) Gen2, with Synapse SQL pools or Spark for query. With Microsoft Fabric's emergence, the equivalent is **Fabric Link for Dataverse**, which is increasingly the recommended path. Understanding both clarifies the strategic direction. **The problem Synapse Link solves.** - Dataverse is a transactional system; analytical queries against it can degrade performance for users. - API-based extraction is slow for large data; OData paging adds overhead. - Nightly batch ETL introduces 24-hour latency. - Analytical queries want columnar storage and parallel compute; Dataverse's storage isn't optimised for that. Synapse Link extracts changes continuously, lands them in ADLS as CSV or Parquet, and exposes them to analytical tools. **Architecture.** - **Dataverse environment** — source. - **Synapse Link configuration** — per-table choices for replication. - **ADLS Gen2 storage account** — destination. - **Synapse workspace** — provides SQL serverless and Spark compute over ADLS. - **Initial sync** — bulk copy of selected tables. - **Continuous delta** — change-tracking-based updates flowing every 15+ minutes. The setup is mostly point-and-click in the Power Platform portal. ## Storage format Two options: - **CSV** — simpler, larger, no schema enforcement. - **Delta Parquet** — columnar, smaller, schema-on-write, queryable as a Delta Lake table. Delta Parquet is the modern choice; better performance and capability. ## Folder structure ADLS layout typically: ``` container/dataverse/ {table-name}/ {year}/{month}/{day}/ file1.parquet file2.parquet ... table-name.snapshot/ table-name.cdf/ ``` `.snapshot` holds the current state; `.cdf` (change data feed) holds incremental changes. **Query patterns.** - **Synapse SQL serverless** — `SELECT ... FROM OPENROWSET(...)` over the Parquet files. - **Synapse Spark** — Spark notebooks reading the Delta tables. - **Power BI** — directly query the Synapse SQL endpoint. - **External tools** — read the Parquet directly. ## Fabric Link for Dataverse The Microsoft Fabric–native version: - Same conceptual model: continuous replication of Dataverse to lake-based storage. - Destination: OneLake (Fabric's storage layer). - Native integration with Fabric Lakehouse, Warehouse, semantic models. - **Direct Lake mode** — Power BI semantic models read from OneLake without import. Fabric Link is the strategic direction. New deployments should default here; existing Synapse Link deployments may migrate over time. **What replicates.** - **All standard columns** of selected tables. - **Choice values** as labels (not numeric codes). - **Lookups** as related record IDs. - **Audit history** (optional). - **Activity records** (optional). ## Latency From change in Dataverse to availability in ADLS / OneLake: - **Minimum** ~15 minutes for active changes. - **Typical** within an hour. - **Bulk operations** may lag longer. Not real-time but fresh enough for most analytical use. **Cost.** - **Dataverse Synapse Link** — minimal incremental Dataverse cost. - **Storage** — ADLS or OneLake bytes. - **Compute** — Synapse SQL serverless per query; Spark per session. - **Fabric** — Fabric capacity consumed. For analytical workloads, the cost is generally favourable vs running queries directly against Dataverse APIs at scale. ## Per-table selection Not every table needs replication: - High-value tables for analytics — yes. - System tables (audit, async operations) — usually no. - Custom tables — yes if used in analytics. - Reference data — usually yes. Each table replicated costs storage and compute. Curate the list. ## Schema evolution When a Dataverse table changes (column added, renamed): - Synapse Link / Fabric Link picks up new columns. - Renamed columns can break dependent queries. - Deleted columns lag in the lake. Schema drift is a continuous concern; document column dependencies for queries. **Use cases beyond reporting.** - **Machine learning training** — historical Dataverse data as ML training set. - **Data warehouse loading** — stage to a curated warehouse. - **Cross-system analytics** — combine Dataverse with non-Dataverse data. - **Archival** — long-term retention beyond Dataverse's storage tier. **Comparison with alternatives.** | Approach | Latency | Setup | Cost | Use case | |---|---|---|---|---| | **Synapse Link** | ~15 min | Low | Moderate | Analytics replication | | **Fabric Link** | ~15 min | Low | Moderate | Fabric-centric analytics | | **ADF pipeline** | Scheduled | Higher | Moderate | Custom transformations | | **API extraction** | On-demand | Custom | Per-call | Specific data needs | | **Direct Dataverse query** | Real-time | None | Per-query | Operational queries | For analytical workloads, Synapse/Fabric Link wins for most scenarios. **Common pitfalls.** - **Selecting everything.** All Dataverse tables replicated; storage and cost balloon; usability suffers. - **Schema changes not tracked.** Downstream queries break silently. - **No retention policy.** Lake accumulates indefinitely; cost grows. - **Mixed modes.** Some tables in CSV, some in Parquet; queries inconsistent. - **Security gap.** Lake permissions less granular than Dataverse; sensitive data exposed to broader audience. ## Security considerations Replicated data in the lake bypasses Dataverse's row-level security: - **Lake security** is file/folder/container based. - **Sensitive data** in replicated tables is accessible to anyone with lake access. - **Mitigation** — separate sensitive tables into restricted containers; column-level masking in views. For regulated data, careful planning of who can query the lake is essential. ## Strategic positioning Synapse Link / Fabric Link is the canonical pattern for Dataverse analytics. For new analytics workloads, set up Fabric Link from the start; build Lakehouse and semantic models on top. For existing reporting on Dataverse, evaluate moving to Fabric Link to offload analytical load from production Dataverse. The operational simplicity (low setup, continuous replication, native integration) makes it default for any meaningful analytics workload against Dataverse. ## Where to go next The successor path is [Fabric Link for Dataverse](https://www.solvingdynamics365.com/guides/integrating-dataverse-with-microsoft-fabric-link) and the destination is [Microsoft Fabric and Dynamics 365](https://www.solvingdynamics365.com/guides/microsoft-fabric-and-dynamics-365). Landing in your own lake is [bring your own storage](https://www.solvingdynamics365.com/guides/integrating-dataverse-with-bring-your-own-storage). Reporting on the result is [Power BI for Dynamics 365](https://www.solvingdynamics365.com/guides/power-bi-for-dynamics-365), and the transactional alternative for small deltas is [change tracking](https://www.solvingdynamics365.com/guides/change-tracking-in-dataverse). --- # B2C authentication with Dynamics 365 How to authenticate external customers and partners against Dynamics 365 — Entra External ID (formerly Azure AD B2C), Power Pages authentication. Source: https://www.solvingdynamics365.com/guides/b2c-authentication-with-dynamics-365 Section: Integrations / API & identity Published: 2026-05-01 Updated: 2026-08-25 Dynamics 365 needs to authenticate two kinds of users: internal employees (Entra ID workforce identities) and external customers and partners (B2C-style identities). The patterns for the second case have evolved — Azure AD B2C, Power Pages's built-in identity providers, and now **Microsoft Entra External ID**. Knowing the options and the trade-offs is essential for any customer-facing deployment. **Internal vs external identity.** - **Internal (workforce)** — employees with Entra ID accounts. Single tenant, controlled provisioning. - **External (customer)** — customers, partners, suppliers. Many millions potential. Self-registered. Different lifecycle from employees. Putting customers in the workforce Entra ID tenant is a bad idea — different lifecycle, different scale, license implications. ## Azure AD B2C (legacy) The historical Microsoft B2C identity solution: - Separate tenant from workforce. - Self-registration via custom policies. - Social identity providers (Google, Facebook, Apple). - Custom branding. - MFA configurable. Used widely; mature; supported. New deployments now have an alternative. ## Microsoft Entra External ID Rebranded and modernised replacement: - Same conceptual model — external identity tenant. - Integrated with modern Entra features. - Improved developer experience. - Same auth protocols (OAuth, OIDC). For new B2C deployments, Entra External ID is the path. Existing Azure AD B2C continues to work but Microsoft's investment is shifting. ## Power Pages identity providers Power Pages portals can authenticate users via: - **Local accounts** — username/password in Dataverse (small scale only). - **Microsoft accounts** — personal Microsoft accounts. - **Entra ID** — workforce accounts. - **Entra External ID / Azure AD B2C** — purpose-built customer identity. - **Social providers** — Google, Facebook, LinkedIn. - **SAML 2.0** — enterprise federation. - **OAuth 2.0** — generic. For customer portals, the combination of Entra External ID + selected social providers is common. ## The contact-record binding Power Pages binds an authenticated user to a Dataverse **contact** record: - First-time login → contact lookup by email or external ID → if found, bind; if not, create. - Subsequent logins use the binding. - The contact's web roles drive what the user can see and do. This is the mechanism connecting authentication (who) with authorisation (what). **User registration flows.** - **Self-registration** — user signs up; account created with limited access; possibly admin approval for elevated access. - **Invitation-based** — admin invites; user redeems invitation; account created with pre-configured role. - **Federation** — user's enterprise IdP federates; user appears with prior trust. Different flows suit different B2C scenarios — public portal vs partner portal vs supplier portal. **MFA for external users.** - Strongly recommended for any portal accessing sensitive data. - Configurable per identity provider. - Step-up MFA — required only for high-risk operations. ## Single sign-on (SSO) for customers If the same customer authenticates across multiple Microsoft-hosted properties: - Single Entra External ID tenant. - Customer signs in once, accessing all properties. - Sign-out propagates. Reduces friction; improves customer experience. ## Custom user attributes External identity tenants can store: - Standard claims (email, name). - Custom claims (loyalty number, tier, preferences). Claims flow into the application as token claims at sign-in. Available for personalisation and authorisation. **Conditional access for external users.** - Risk-based — block sign-in from suspicious locations. - Device-based — require managed devices for sensitive access. - App-based — different rules per app. Same Conditional Access framework as workforce, applied to external identities. **B2C with Dynamics 365 specifics.** - **Customer self-service portal** — Power Pages + Entra External ID. - **Partner portals** — same pattern; partner-specific business logic. - **Supplier portals** — for F&O vendor collaboration; Entra External ID for supplier sign-in. - **Marketing forms** — anonymous-to-known conversion; identity captured on first form submission. **Pricing and licensing.** - Entra External ID priced per monthly active user (MAU). - First N users free; pay-per-user beyond. - Compared to AAD B2C: similar economics, modernized billing. For high-volume consumer portals (millions of users), unit economics matter — model carefully. **Migration from Azure AD B2C to Entra External ID.** - New tenant creation. - User migration — depending on volume, batch process. - Application reconfiguration — update endpoints. - Custom branding ported. - Testing. Microsoft provides tooling and guidance; migration is non-trivial but achievable. **Common pitfalls.** - **Customers in workforce tenant.** Wrong tenant; licence cost; security risk. - **Local accounts at scale.** Username/password storage in Dataverse for thousands of customers; password management nightmare. - **No MFA.** Customer accounts compromised; data exposure. - **Single failure point.** Only one IdP supported; if it's down, all customers locked out. - **Identity-to-contact mismatch.** Email-based binding fails when customer changes email; new contact created; history lost. - **Conditional access too strict.** Legitimate customers blocked. ## Operational guidance For new customer-facing Dynamics 365 deployments: - Use Entra External ID. - Layer in social providers based on audience. - Enable MFA at minimum for sensitive operations. - Conditional Access policies appropriate for risk profile. - Plan contact-record binding lifecycle carefully. ## Strategic positioning Customer identity is foundational for any external-facing Dynamics 365 deployment. The platform supports flexible patterns; choosing the right one depends on audience size, security needs, and integration complexity. Entra External ID is the strategic direction; for new projects, it's the default choice. The investment in clean identity architecture pays back continuously — every customer self-service interaction depends on it working reliably. --- # Batch operations in the Dataverse Web API How to make multiple Dataverse Web API calls in one HTTP round-trip — $batch requests, change sets, and the performance gains at scale. Source: https://www.solvingdynamics365.com/guides/batch-operations-in-the-dataverse-web-api Section: Integrations / API & identity Published: 2026-05-01 Updated: 2026-08-25 Calling Dataverse one record at a time over the Web API is fine for occasional operations. For integrations processing hundreds or thousands of records, the per-call HTTP overhead dominates total time. **Batch operations** — submitting multiple operations in a single HTTP request — collapse that overhead and unlock substantially higher throughput. ## The OData batch endpoint The Web API exposes a batch endpoint at `POST /api/data/v9.x/$batch`. The request body is a multipart payload containing many sub-requests; the response is a multipart payload with each sub-response. **Anatomy of a batch request.** ``` POST /api/data/v9.2/$batch HTTP/1.1 Content-Type: multipart/mixed; boundary=batch_AAA --batch_AAA Content-Type: application/http Content-Transfer-Encoding: binary GET /api/data/v9.2/accounts(GUID-1) HTTP/1.1 Accept: application/json --batch_AAA Content-Type: application/http Content-Transfer-Encoding: binary GET /api/data/v9.2/accounts(GUID-2) HTTP/1.1 Accept: application/json --batch_AAA-- ``` Multiple GETs in one HTTP round-trip; the server processes each, responses bundle into the multipart reply. ## Mixing operation types Within one batch, mix GETs, POSTs, PATCHes, DELETEs. For non-GET operations, wrap them in a **change set** for transactional atomicity (see below). **Change sets — atomic groups within a batch.** A **change set** is a sub-group within a batch that's processed atomically — either all sub-requests succeed or all are rolled back. Used for related writes that must succeed together: ``` --batch_AAA Content-Type: multipart/mixed; boundary=changeset_BBB --changeset_BBB Content-Type: application/http Content-Transfer-Encoding: binary POST /api/data/v9.2/accounts HTTP/1.1 Content-Type: application/json { "name": "Contoso" } --changeset_BBB Content-Type: application/http Content-Transfer-Encoding: binary POST /api/data/v9.2/contacts HTTP/1.1 Content-Type: application/json { "firstname": "Karen", "_parentcustomerid_value": "$1" } --changeset_BBB-- --batch_AAA-- ``` The contact creation references the account via the `$1` placeholder — the platform substitutes the newly-created account's GUID in the second request. If either fails, both roll back. **Performance characteristics.** - **Network round-trip count drops** from N to 1. Latency reduces dramatically for chatty integrations. - **Throughput increases** — batch of 100 records typically completes in seconds vs minutes. - **Server processing** — each sub-request still executes server-side individually; CPU savings are modest. - **Throttling** — batch requests count toward Dataverse API limits as multiple requests (one per sub-request). **Practical limits.** - **Maximum sub-requests per batch** — typically ~1000 per batch. - **Maximum change sets per batch** — typically ~10. - **Maximum sub-requests per change set** — typically ~100. - **Maximum payload size** — typically several megabytes; very large attachments hit limits. Check Dataverse documentation for current values; they evolve. **Common patterns.** - **Bulk upsert** — submit 100 PATCHes-with-create-if-missing in one batch. - **Related-record creation** — create an Account plus 10 Contacts in one batch with a change set, ensuring atomicity. - **Read-many-by-ID** — submit 100 GETs in one batch instead of 100 round-trips. - **Mass deletion** — submit 100 DELETEs in one batch. - **Read followed by conditional write** — a batch with a GET sub-request whose result drives a conditional PATCH in the same batch. ## SDK support The Dataverse SDK for .NET (`OrganizationServiceProxy`, `ServiceClient`) supports batch operations through `ExecuteMultipleRequest` — the SDK equivalent of the Web API's batch endpoint. The mechanics differ slightly but the pattern is the same. ## Power Automate Power Automate's "List rows" and other Dataverse actions don't natively use batch internally for bulk operations. To use batching from Power Automate, call the Web API directly via the HTTP action with a multipart body — more code, but substantial performance gain for bulk scenarios. **Common pitfalls.** - **Throttling surprise** — a batch with 100 sub-requests consumes 100 API call units, not 1. Plan capacity. - **Mixing transactional and non-transactional in one batch** — change sets vs free sub-requests have different rollback semantics. Be deliberate. - **Batch larger than the limit** — exceeds maximum; gets rejected. Split. - **Error handling — partial success** — non-change-set sub-requests can independently succeed or fail; the consumer must process the response carefully. ## Operational reality For any Dataverse integration handling more than dozens of records, batching is the table-stakes optimisation. The investment is small at design time; the throughput gain compounds over the integration's life. --- # Bring-your-own-storage patterns for Dataverse What 'BYOS' actually means in the Dataverse world — customer-managed keys, your own data lake for Synapse Link, SharePoint and Azure Blob for files. Source: https://www.solvingdynamics365.com/guides/integrating-dataverse-with-bring-your-own-storage Section: Integrations / Data movement Published: 2026-09-02 "Bring your own storage" gets asked for in Dataverse projects for three unrelated reasons that happen to share a phrase. Someone wants the storage bill to go down. Someone wants the data to sit in an Azure subscription they control. Someone in compliance wants to hold the encryption keys. Dataverse does not offer a single switch that moves its database into your storage account, and anyone promising that is describing something else. What it offers is a set of specific mechanisms, each answering one of those three needs, and it pays to match the mechanism to the need before anyone buys a storage account. ## What Dataverse will not do Dataverse's transactional database is Microsoft-managed. You cannot point it at your own Azure SQL or storage account, and you cannot run it on-premises. Its capacity model, described in [Dataverse storage types explained](https://www.solvingdynamics365.com/guides/dataverse-storage-types-explained), splits usage into Database, File, and Log, and all three are billed as Dataverse capacity regardless of what you would prefer. The patterns below work around the edges of that model; none of them replace it. ## Need 1: control of encryption keys **Customer-managed keys (CMK).** Dataverse environments can be encrypted with a key you hold in Azure Key Vault rather than a Microsoft-managed key. Microsoft still stores the data; you control the key, can rotate it, and can revoke it, which renders the environment inaccessible until access is restored. This is the compliance answer for organisations whose policy requires key custody. It applies to Managed Environments, needs an enterprise policy in Azure, and carries operational responsibility: lose the key, lose the environment. It does not reduce cost or move data. CMK is not BYOS in the literal sense, but it is often what the compliance requirement behind a BYOS request is actually asking for. Confirm that before going further. See [Dynamics 365 data protection and compliance](https://www.solvingdynamics365.com/guides/dynamics-365-data-protection-and-compliance). ## Need 2: data in a subscription you control **Synapse Link to your own data lake.** The closest thing to true bring-your-own-storage. Dataverse continuously writes a copy of selected tables to an ADLS Gen2 account in your subscription, in your region, under your access controls. It is a copy for analytics and integration, not the operational database, and Dataverse keeps running from its own storage. But it satisfies the requirement that a full, current copy of the data lives in storage you own and can retain, secure, and hand to any tool you like. See [Azure Synapse Link for Dataverse](https://www.solvingdynamics365.com/guides/azure-synapse-link-for-dataverse). The Fabric variant, Link to Fabric, keeps the data in Dataverse-managed storage and exposes it through OneLake without a copy. It is simpler but does not put anything in your subscription; if that was the point, use Synapse Link. **Long-term retention.** Dataverse's long-term data retention feature moves inactive rows to a cheaper Microsoft-managed tier inside Dataverse. It is about cost, not custody, and belongs under the next heading. ## Need 3: lower storage cost File storage is where Dataverse bills hurt: attachments, images, and documents accumulate and are charged as File capacity. The patterns that offload them: **SharePoint document management.** The standard integration stores documents in SharePoint document libraries linked to Dataverse records, using Microsoft 365 storage rather than Dataverse File capacity. It is first-party, mature, and the default answer for documents on accounts, cases, and opportunities. See [SharePoint document management for Dynamics 365](https://www.solvingdynamics365.com/guides/sharepoint-document-management-for-dynamics-365). It does not cover note attachments or email attachments automatically. **Attachment offload to Azure Blob or SharePoint.** Note and email attachments can be moved out of Dataverse to Azure Blob storage or SharePoint by an attachment management solution, of which Microsoft has published one and several ISVs sell others, or by a custom plug-in that intercepts the attachment on create and stores a link. This is the true BYOS for files: the bytes live in your storage account, Dataverse holds a pointer. The catch is that everything that expects the attachment to be in Dataverse (exports, some mobile clients, some reports) needs to understand the pointer. **Long-term data retention** for row data: policies move old cases, activities, and custom-table rows into a retained store that is queryable but cheaper. Rows come back read-only through a separate path. It is the right tool for compliance retention of closed records that nobody edits. **Archiving to your own store.** Export old rows through Synapse Link or a scheduled pipeline into your lake, then [bulk delete](https://www.solvingdynamics365.com/guides/bulk-delete-jobs-in-dataverse) them from Dataverse. Cheapest, fully in your control, and the rows are gone from the application. Suitable when the business agrees that old data lives in reports, not in forms. ## Choosing Key custody: CMK. A copy in your subscription: Synapse Link. Documents: SharePoint integration. Attachments driving File capacity: an offload solution to Blob or SharePoint. Old rows driving Database capacity: long-term retention if they must stay queryable in place, archive-and-delete if they need not. ## What breaks in practice CMK operations that were not rehearsed, so a key rotation locks people out. Synapse Link storage accounts created without lifecycle policies, so the lake costs more than the Dataverse capacity it was meant to offset. Attachment offload solutions that break a downstream integration expecting real attachments. Archive-and-delete run without confirming that a report somewhere reads those rows. ## Stability verdict Every mechanism here is supported and stable. The instability is expectation: a BYOS request usually arrives as one sentence and needs three mechanisms to satisfy properly, or one mechanism once the actual requirement is pinned down. Pin it down first. --- # Business Central webhook subscription errors Why a Business Central webhook subscription stops delivering notifications, fails validation, or silently expires — decoded. Source: https://www.solvingdynamics365.com/guides/business-central-webhook-subscription-errors Section: Integrations / Troubleshooting Published: 2026-09-06 A Business Central **webhook subscription** asks the platform to push change notifications to an endpoint you control, instead of your integration polling for changes. Because Business Central never proactively tells a broken subscription's owner that it broke, most failures here show up as notifications simply stopping, not as a visible error. ## The subscription validation handshake fails when first creating it **Symptom.** Creating a new webhook subscription fails immediately, before any notifications are ever expected. **Cause.** Business Central validates a new subscription by sending a validation token to the `notificationUrl` and requiring the endpoint to echo it back within a short window; if the endpoint isn't reachable, doesn't respond fast enough, or doesn't echo the token exactly as required, the subscription creation itself is rejected. **Fix.** Confirm the receiving endpoint is publicly reachable and implements the validation handshake correctly (echoing back the exact `validationToken` value it receives) before assuming the subscription request itself is malformed. **Prevention.** Test the validation handshake in isolation (a simple script that only implements the echo-back behaviour) before wiring the receiving endpoint into the full integration logic, so a handshake bug and a business-logic bug aren't debugged together. ## Notifications simply stop arriving after previously working **Symptom.** A subscription that was delivering notifications correctly for weeks or months stops, with no error surfaced anywhere in Business Central. **Cause.** The most common cause is the subscription's expiration lifetime elapsing without renewal — Business Central does not send a warning before this happens, so an integration that only creates a subscription once and never renews it will eventually go silent with no visible failure. **Fix.** Recreate or renew the subscription (checking the subscription's current expiration via the API first) rather than assuming a platform outage — this is by far the most common reason notifications stop with no error. **Prevention.** Build subscription renewal into the integration itself as a scheduled task well before the maximum lifetime elapses, rather than treating subscription creation as a one-time setup step. ## Notifications arrive but reference records the endpoint can't retrieve **Symptom.** A notification is received correctly, but following the resource URL it contains to fetch the actual changed record returns an authorization or not-found error. **Cause.** The subscription and the resource-fetch step can authenticate as different identities, or the subscribed resource path and the permissions granted to the consuming application's identity can drift out of sync — particularly after a permission set change on the service account used for the integration. **Fix.** Confirm the identity used to fetch the resource named in the notification has read access to that specific resource and company, independent of whatever identity was used to create the subscription itself. **Prevention.** Use the same, dedicated service account consistently for both creating the subscription and fetching resources it notifies about, and review that account's permission set whenever the integration's scope changes. ## A subscription silently stops covering new records after a company or environment change **Symptom.** An established subscription keeps working for existing scope but doesn't notify on records in a company, or scope, added after the subscription was created. **Cause.** A webhook subscription's resource path is scoped at creation time (often per-company); adding a new company or expanding integration scope later does not automatically extend an existing subscription to cover it. **Fix.** Create an additional subscription explicitly scoped to the new company or resource path rather than assuming an existing subscription's coverage grows with the tenant. **Prevention.** Treat "a new company was added" as a checklist item that includes reviewing every existing webhook subscription's scope, not just user licensing and permission sets. ## Where to go next Setting up subscriptions and understanding payload shape in the first place is covered in [webhooks in Business Central](https://www.solvingdynamics365.com/guides/webhooks-in-business-central); the wider API error landscape is in [Business Central API errors](https://www.solvingdynamics365.com/guides/business-central-api-errors). ### Frequently asked questions **Why do Business Central webhook subscriptions expire at all instead of running indefinitely?** Subscriptions have a maximum lifetime and must be renewed before it elapses — this is a deliberate platform design so an abandoned integration's subscription doesn't run forever, and it means any consuming application must build renewal into its own logic rather than treating a subscription as a one-time setup step. **Does a failed subscription silently stop delivering, or does it error visibly?** It silently stops. Business Central does not proactively notify the subscriber's endpoint that a subscription lapsed or was invalidated — from the integration's point of view, notifications simply stop arriving, which is why monitoring for the absence of expected notifications matters as much as monitoring for explicit errors. --- # Business Central webhooks vs Azure Service Bus subscribers Two ways for external systems to learn that something changed in Business Central — API webhook subscriptions or a Service Bus queue fed from AL. Source: https://www.solvingdynamics365.com/guides/integrating-business-central-webhooks-vs-service-bus Section: Integrations / Eventing & messaging Published: 2026-09-02 External systems need to know when a Business Central record changes: a shipment posted, a customer created, an item's price updated. Polling the API every few minutes works and is how most integrations start. When polling stops being good enough, Business Central offers webhook subscriptions on its API, and Azure offers Service Bus for anything you are willing to publish yourself from AL. They solve the same problem at very different levels of effort and reliability, and the choice depends on what happens if a notification is lost. ## How Business Central webhooks work You create a subscription against an API page (standard or custom) with a callback URL. When a record exposed by that API is inserted, modified, or deleted, Business Central sends a notification to the URL. The notification tells you the resource and the change type. It does not carry the record's data; the subscriber then calls the API to fetch what changed. Subscriptions expire after a fixed period and must be renewed. The receiving endpoint must complete a validation handshake when the subscription is created. That model is deliberately lightweight. Business Central batches notifications, may deliver them with a delay of up to several minutes depending on load, and will drop a subscription that repeatedly fails to respond. There is no replay of missed notifications and no guarantee of ordering. Our [webhooks in Business Central](https://www.solvingdynamics365.com/guides/webhooks-in-business-central) guide covers the setup mechanics, and [webhook subscription errors](https://www.solvingdynamics365.com/guides/business-central-webhook-subscription-errors) decodes what to do when a subscription stops delivering, fails validation, or silently expires. ## How the Service Bus pattern works Nothing in Business Central publishes to Service Bus out of the box. You write an AL extension that subscribes to the relevant events (OnAfterPostSalesDoc, OnAfterInsertEvent on the table you care about, or a custom business event), builds a message, and sends it to a Service Bus queue or topic over HTTPS from AL, with the Service Bus credentials held in isolated storage or Azure Key Vault. Downstream systems consume from the queue at their own pace, with Service Bus providing durable storage, retries, dead-lettering, and ordering within a session. The message can carry the full payload so consumers do not need to call back into Business Central. The trade-off is that you now own an extension, its error handling, and the question of what happens when the Service Bus call fails inside a posting routine. The usual answer is an outbox table in Business Central written in the same transaction as the business event, with a job queue entry draining it to Service Bus, so that a Service Bus outage never blocks a posting. See [the outbox pattern with Service Bus](https://www.solvingdynamics365.com/guides/the-outbox-pattern-with-service-bus) for the general shape. ## Business events: the third option Business Central also ships business events, a curated set of application-level events (sales order released, invoice posted) that publish to Dataverse and from there to Power Automate. This is the low-code middle ground: no AL, no polling, richer semantics than a table-level webhook. It routes through Dataverse, which means Power Automate is the natural consumer and the event set is Microsoft's, extensible in AL if you need your own. For notifying Power Platform, business events are usually better than either webhooks or Service Bus. For notifying a non-Microsoft system, they are one more hop. ## Deciding **Use webhooks when** the subscriber is a single system, a delay of minutes is fine, a missed notification is recoverable by the next one or by a periodic reconciliation, and you do not want to write AL. Syncing a product catalogue to an e-commerce platform is a good fit; the catalogue will be reconciled nightly anyway. **Use Service Bus when** several systems need the same events, when losing an event has a business cost (a posted invoice that never reaches the payment platform), when ordering matters, or when consumers cannot be reached synchronously and need to catch up later. Order-to-cash and finance postings belong here. **Use business events when** the consumer is Power Automate or something else in the Power Platform and the event you need is in the standard set. ## The lost-notification test Ask what happens if one notification never arrives. If the answer is "the next scheduled reconciliation picks it up", webhooks are fine and cheap. If the answer is "a customer does not get their goods", you need durable messaging and an outbox, and the extra AL is the cost of that guarantee. Most integrations that start on webhooks and later migrate to Service Bus do so after a lost notification caused a visible problem. ## Operational differences Webhook subscriptions expire; something must renew them, and forgotten renewals are the most common failure. The receiving endpoint must be reachable from the internet and respond quickly, which usually means an Azure Function or Logic App in front of anything on-premises. Service Bus needs no inbound endpoint, works from anywhere, and has queue depth and dead-letter metrics you can alarm on; see [message replay and poison queue handling](https://www.solvingdynamics365.com/guides/message-replay-and-poison-queue-handling-for-d365). Both patterns need reconciliation. Even with Service Bus, a periodic comparison between Business Central and the downstream system catches the cases where a message was consumed but the consumer's write failed. ## Cost Webhooks are free apart from the compute that receives them. Service Bus is inexpensive at typical ERP volumes, and the real cost is the AL extension and the discipline to maintain it. Business events sit in between and consume Power Platform request capacity. ## Stability verdict Webhooks are stable but limited by design, and they have not changed much in years. The Service Bus pattern is stable because you built it, and it will be as reliable as your outbox and your consumers. Business events are the newest and the one most likely to grow in scope. Our broader [AL events and integration patterns](https://www.solvingdynamics365.com/guides/al-events-and-integration-patterns) guide covers the AL side in more depth. ### Frequently asked questions **How do Business Central webhooks work?** You subscribe to an API page with a callback URL; on insert, modify, or delete Business Central sends a notification naming the resource and change type, without the data — the subscriber then calls the API. Subscriptions expire and must be renewed, notifications can be delayed by minutes and batched, and there is no replay or ordering. **How does the Service Bus pattern work?** An AL extension subscribes to events such as OnAfterPostSalesDoc, builds a message with the full payload, and sends it to a Service Bus queue or topic — usually through an outbox table drained by a job queue so a Service Bus outage never blocks posting. Consumers get durable storage, retries, dead-lettering, and session ordering. **What are business events?** A curated set of application-level events — sales order released, invoice posted — published to Dataverse and consumed by Power Automate with no AL. The best option when the consumer is in the Power Platform and the event is in the standard set. **How do I decide between webhooks and Service Bus?** Ask what happens if one notification never arrives. If a nightly reconciliation catches it, webhooks are fine. If a customer does not get their goods or an invoice never reaches the payment platform, you need Service Bus and an outbox. --- # Change tracking and delta queries in Dataverse How Dataverse change tracking enables efficient incremental sync — enabling per table, using delta tokens, and integration patterns. Source: https://www.solvingdynamics365.com/guides/change-tracking-in-dataverse Section: Integrations / Eventing & messaging Published: 2026-05-01 For any integration that periodically pulls data from Dataverse — analytics ETL, search-index updates, external-system sync, archive workflows — fetching the full table every time is wasteful. **Change tracking** is the Dataverse mechanism that lets consumers fetch *only what's changed* since their last query, dramatically reducing load and improving sync freshness. ## The model Change tracking is enabled per table. When enabled, every modification (Create, Update, Delete) on the table records to a change-log. Consumers query with a **delta token** representing the point they last synced; the response returns: - Records modified since the token. - Deleted record IDs since the token. - A new delta token to use for the next query. The pattern: query → get changes → process → save the new token → query again with the new token next time. ## Enabling change tracking In the table's settings: **Track changes** toggle. Once enabled, the change-tracking infrastructure starts immediately for new changes; existing records are *not* retroactively tracked. The first query returns all current records as the "initial state" plus a starting delta token. Microsoft has change tracking enabled by default for most standard tables; custom tables need explicit enabling. ## The delta token The token is opaque to consumers — a long string the Web API issues. Each query passes the previous token; the response contains the new one. Tokens are valid for a configurable window (typically 30 days for Dataverse); after expiry, the consumer must do a full re-fetch. **The API pattern.** ``` GET /api/data/v9.2/accounts?$select=name,modifiedon Prefer: odata.track-changes ``` Initial response includes a `@odata.deltaLink` header with the URL containing the token. Next query: ``` GET ``` Returns only the changes since the previous query's snapshot moment. **Use cases.** - **Search-index refresh** — keep an Azure Cognitive Search index aligned with Dataverse; query the delta hourly and update only changed records. - **Data-warehouse loads** — incremental loads into Synapse / Fabric / Snowflake without re-extracting unchanged rows. - **External-system sync** — keep a partner system aligned with Dataverse changes. - **Cache invalidation** — invalidate cached records when they change. ## Synapse Link as the modern alternative For analytics workloads, **Synapse Link for Dataverse** offers a managed alternative: continuous near-real-time replication of Dataverse changes to OneLake (or to a Data Lake / Synapse). The customer doesn't manage delta tokens; Microsoft handles the change capture and streaming. For analytics use cases at scale, Synapse Link is generally preferable to roll-your-own change-tracking queries. Change tracking is the right path for: - Specific, low-volume targeted syncs (not broad analytics). - Custom integration patterns where Synapse Link isn't suitable. - Real-time triggers where the consumer wants explicit control. **Limits.** - **Token expiry** — 30-day default. Long-paused consumers must do full re-fetches. - **Filter doesn't apply to deletes** — when a record is deleted, the change-tracking response includes its ID but no fields; you can't filter "only deletes in EMEA" effectively. - **Performance at scale** — extremely high change rates produce large delta responses; chunk and paginate. - **Schema changes** — if a column is added after tracking starts, historical changes don't have data in that column. ## Comparison with webhooks / Service Bus Change tracking is pull-based — the consumer queries periodically. Webhooks and Service Bus integration are push-based — Dataverse notifies the consumer of each change. Trade-offs: - **Pull (change tracking)** — consumer controls cadence; works for batch sync; doesn't lose events if the consumer is down. - **Push (webhooks / Service Bus)** — near-real-time; the consumer must be available or use a durable buffer like Service Bus to avoid loss. Many architectures use push for real-time and pull for backfill / reconciliation. **Common pitfalls.** - **Forgetting to enable on a custom table** — incremental sync doesn't work; fall back to full re-fetches. - **Not handling token expiry** — once the token expires, the consumer must detect and re-initialise. - **Assuming change tracking catches everything** — some bulk operations (some plug-in bypasses, direct SQL in on-premise) don't show in the change feed. Verify per use case. ## Operational discipline Build delta-aware integrations from the start. The performance and freshness advantages compound at scale; retrofitting later is more work than enabling early. --- # Circuit breakers in Dynamics 365 integrations How the circuit-breaker pattern protects Dynamics 365 integrations from cascading failures — implementation in Azure Functions, Logic Apps. Source: https://www.solvingdynamics365.com/guides/circuit-breakers-in-dynamics-365-integrations Section: Integrations / Resilience & ops Published: 2026-05-01 When a downstream system fails, a naive integration keeps retrying — burning resources, prolonging the outage, and sometimes pushing the failing system further down. The **circuit-breaker** pattern interrupts this cycle: detect failures, stop calling the failing service, periodically test recovery, restore traffic when healthy. It's a foundational reliability pattern that Dynamics 365 integrations frequently lack. ## The circuit-breaker analogy Like an electrical breaker: - **Closed** — traffic flows normally. - **Open** — failures detected; traffic blocked. - **Half-open** — test traffic allowed to check recovery. - **Re-closed** — recovery confirmed; full traffic resumes. The state machine prevents wasted effort during outages. **Why this matters for Dynamics 365.** - Dynamics 365 integrations often interact with multiple downstream systems. - Each downstream is a failure surface. - Without circuit breakers, failures cascade — one slow downstream blocks the integration. - Backpressure handling prevents queue buildup. **Implementation in Azure Functions.** - Use a library like Polly (in .NET) or Resilience4j (Java) for circuit-breaker semantics. - Configure thresholds: failures per time window to trip; recovery test interval. - Wrap downstream HTTP calls in the circuit-breaker policy. ```csharp var policy = Policy .Handle() .CircuitBreakerAsync( exceptionsAllowedBeforeBreaking: 5, durationOfBreak: TimeSpan.FromMinutes(1)); await policy.ExecuteAsync(async () => await client.PostAsync(url, content)); ``` ## Implementation in Logic Apps Logic Apps doesn't have native circuit-breaker but you can approximate: - Persisted state (Storage Table) tracks recent failures. - Conditional logic checks state before calling downstream. - Periodic Logic App probes downstream and updates state. More complex than code-based; works for simple scenarios. **Implementation in Dataverse plug-ins.** - Plug-ins don't natively support circuit-breaker semantics. - The plug-in should write to a queue (Service Bus) rather than call downstream directly. - The queue consumer implements the circuit-breaker. This pattern — plug-in to queue to consumer — separates concerns and lets the consumer be reliable. **Thresholds and tuning.** - **Failure threshold** — how many failures before tripping. Too low: false trips during transient blips. Too high: trip too late. - **Window size** — over what time period failures are counted. - **Recovery test interval** — how long to wait before testing recovery. - **Half-open behaviour** — how many test calls to confirm recovery. Tuning requires observation. Start conservative (high threshold, long break); tighten based on data. ## Per-service vs per-integration Circuit-breaker scope: - **Per downstream service** — one breaker per service; isolation between services. - **Per integration endpoint** — finer granularity. - **Per tenant** — for multi-tenant SaaS scenarios. Per-service is usually right; finer granularity adds complexity without much benefit unless you have specific reasons. ## Combining with retry Circuit-breaker and retry are complementary: - **Retry** handles individual call failures. - **Circuit-breaker** handles sustained failure patterns. Wrap retry inside circuit-breaker: retry handles flakes; circuit-breaker handles outages. ## Fallback behaviour When the circuit is open: - **Fast-fail** — return error immediately to caller. - **Default response** — return cached or default data. - **Queue for later** — write to dead-letter / outbox for retry post-recovery. - **Degraded mode** — partial functionality. For non-critical downstream (analytics, recommendations), fast-fail or default is fine. For critical downstream, queue for later. ## Monitoring Circuit-breaker state is operationally critical: - **State changes** — alert when circuit opens. - **Failure rate** — track over time; tune thresholds. - **Recovery time** — how long do outages last. - **Stop-gap effectiveness** — what % of calls did the breaker save? Without monitoring, circuit-breakers are invisible; problems only surface when fallback behaviour is noticed by users. **Common pitfalls.** - **No circuit-breaker.** Cascading failures pile up. - **Thresholds too sensitive.** Brief blips trip the breaker; user-visible failures from a recovering downstream. - **Thresholds too lenient.** Outage continues to drag the integration down. - **No fallback strategy.** Breaker opens; caller gets a hard failure; user-visible regardless. - **Per-call state not shared.** Distributed integration; each instance has its own circuit-breaker state; inconsistent behaviour. - **No recovery test.** Breaker stays open; service recovers but breaker doesn't notice. ## Distributed circuit-breakers For multi-instance integration: - **Shared state in Redis** — coordinated across instances. - **Sticky failures** — instance-local; less coordination needed. - **Coordination via control plane** — explicit healthcheck-driven. Shared state is the cleanest; cost of Redis is typically acceptable for production systems. ## Bulkheads Related pattern: limit how much of your service's capacity goes to any one downstream: - **Thread pool limits** — at most N concurrent calls to downstream X. - **Queue limits** — at most N messages in flight. Combined with circuit-breaker: bulkheads contain damage from a slow downstream; circuit-breakers stop calling a failing downstream entirely. ## Strategic positioning Resilience patterns — retry, circuit-breaker, bulkhead, dead-letter — are a coherent set. Implementing all of them produces robust integrations. Implementing none of them produces brittle ones. The investment is engineering discipline, applied consistently across integrations. For Dynamics 365 integrations: - Critical paths — full set of resilience patterns. - Best-effort paths — at minimum retry and DLQ. - Prototypes — minimal patterns acceptable; production-bound paths need uplift. The teams that consistently apply these patterns have integrations that run for years without intervention. The teams that don't, have integration incidents weekly. The cost of resilience engineering is paid once; the savings compound forever. --- # Common Business Central ISV add-ons Categories of Business Central ISV add-ons that customers most often install — country localizations, document automation, EDI, banking. Source: https://www.solvingdynamics365.com/guides/common-business-central-isv-addons Section: Integrations / Data movement Published: 2026-05-01 Few Business Central implementations run on a pure base application. ISVs fill the gaps with add-ons distributed through **AppSource**, and a handful of categories appear on almost every customer's installed-app list. Knowing the categories helps scope an implementation early. ## Country localizations Microsoft ships country localizations for around twenty countries directly; the rest come from local partner ISVs as AppSource apps. Common examples: SAF-T for the Nordics, real-time invoice reporting (RTIR) for Hungary, Poland's JPK, Italy's Fatturazione Elettronica, Saudi Arabia's ZATCA e-invoicing. Localizations cover VAT rates, statutory reports, electronic invoicing, payment files, and country-specific document layouts. ## Document automation AP automation is the single most popular ISV category. ISVs (Continia, ExFlow, Lasernet, Documotor) extract data from vendor PDFs/EDI/email, run them through approval, and post to BC. The base BC ships modest invoice capture and approval; AP automation ISVs add line-level matching, OCR, multi-format ingestion, and complex approval routing. ## EDI Lanham, EDICOM, TIE Kinetix, Pagero and others provide full EDI solutions on BC, covering trading partner onboarding, document maps, and chargeback monitoring (see the EDI guide). ## Banking Local banking integrations — feeds, payment files, statement imports — beyond Microsoft's bundled connectors. Common in markets like the Nordics, Benelux, UK, and Brazil where banking varies by country. ## Manufacturing ISVs (Insight Works, To-Increase, Aptean) add advanced manufacturing features missing from BC's base — shop-floor data collection, finite scheduling, advanced quality management, MES integration, engineering change orders. ## Distribution and warehouse Beyond BC's built-in WMS, ISVs offer scanning UIs (Tasklet, Insight Works WMS, Continia), 3PL connectors, parcel-carrier integration (UPS/FedEx/DHL/PostNord shipping labels), and complex pricing engines. ## Field service For BC-anchored services businesses, ISVs deliver service management and field dispatch capabilities beyond BC's basic service module. ## Project / PSA Add-ons that extend BC's project module toward full PSA — sophisticated billing, resource management, time and expense. ## E-commerce connectors Beyond Microsoft's Shopify connector, ISVs connect WooCommerce, Magento, BigCommerce, and headless commerce platforms to BC. ## Reporting and dashboarding Beyond the built-in Account Schedules and Power BI, ISVs offer richer financial reporting and corporate performance management add-ons. ## Compliance and audit GDPR helpers, audit-trail strengtheners, fraud-detection add-ons. ## Caveat Each installed add-on is a piece of software to upgrade twice a year. A typical BC tenant has five to fifteen installed extensions. Twenty-plus starts to slow upgrades meaningfully. Choose deliberately. --- # CQRS pattern for Dynamics 365 How CQRS (Command Query Responsibility Segregation) applies to Dynamics 365 architectures — write vs read separation, projection patterns. Source: https://www.solvingdynamics365.com/guides/cqrs-pattern-for-dynamics-365 Section: Integrations / Architecture patterns Published: 2026-05-01 **Command Query Responsibility Segregation (CQRS)** separates write operations (commands) from read operations (queries). For complex domains with imbalanced read/write loads or different consistency needs, this separation enables independent optimisation. Some Dynamics 365 architectures benefit from CQRS principles, particularly for high-volume read scenarios. **The core idea.** - **Command** — change state (Create, Update, Delete). - **Query** — read state. - **Separate models** for each. - **Read model** projected from write model. The separation enables specialisation; read-optimised vs write-optimised. **Why separate.** - **Different scale needs** — reads typically more numerous than writes. - **Different schemas** — denormalised reads, normalised writes. - **Different consistency** — eventual consistency for reads acceptable. - **Different security** — read access broader than write. The asymmetry is fundamental; CQRS exposes it as architecture. **In Dynamics 365 context.** - **Write side** — Dataverse / F&O — the system of record. - **Read side** — replicated to optimised store. - **Projection** — translates write events to read updates. Examples: - Dataverse + Power BI semantic model — semantic model is read-optimised projection. - F&O + data lake — lake is read-optimised projection. - Dataverse + Azure Search — search index is read-optimised. **Where CQRS clearly helps.** - **Analytical workloads** — heavy reads, infrequent writes; warehouse pattern. - **Search workloads** — search index optimised for queries. - **Reporting** — read-only views without taxing operational system. - **Customer-facing portals** — high read volume from many users. - **Cross-system aggregation** — combine sources into queryable view. **Where CQRS adds unnecessary complexity.** - **Simple CRUD** — no benefit from separation. - **Tight consistency requirements** — eventual consistency unacceptable. - **Low scale** — overhead exceeds benefit. CQRS isn't universally appropriate; assess fit. **Projection mechanisms.** - **Synapse Link / Fabric Link** — Dataverse / F&O to lake. - **Power BI semantic models** — Dataverse to BI. - **Custom replication** — for specific destinations. - **Cosmos DB Change Feed + processor** — for high-throughput scenarios. Each has trade-offs in latency, consistency, cost. ## Eventual consistency A defining characteristic: - Write to source. - Projection happens asynchronously. - Read sees updated value some time later. For most analytics, seconds-to-minutes lag is fine. For real-time requirements, less so. **Write-side model.** - Optimised for transactional integrity. - Normalised schema. - Strong consistency. - Business logic enforced. This is Dataverse / F&O standard model. **Read-side model.** - Optimised for query patterns. - Denormalised structure. - Pre-computed aggregations. - Multiple representations (per user role, per use case). Often columnar storage; star schema; materialised views. ## Multiple read models From one write source: - **Operational read** — recent transactions. - **Analytical read** — historical aggregates. - **Search read** — text-searchable. - **Geo read** — spatial queries. Each tuned to its purpose. **Updates and consistency.** - **Strict consistency** — read sees write immediately. Hard distributed. - **Eventual consistency** — read sees write eventually. - **Read-your-own-writes** — user sees their own changes. - **Causal consistency** — if A caused B, B not seen before A. Most CQRS systems offer eventual; design around it. **Conflict handling.** - Multiple writers; same data updated. - Write side handles via optimistic concurrency or pessimistic locks. - Projection handles via "last write wins" or merge logic. Cross-system updates particularly vulnerable; saga patterns help. ## Event sourcing + CQRS Often combined: - Events as the source of truth (event sourcing). - Projections build query models from events. - Replay rebuilds projections. Powerful but heavy; reserved for specific scenarios. ## Dynamics 365 + Fabric pattern Modern example: - Dataverse and F&O are write-side. - Fabric Lakehouse / Warehouse are read-side. - Synapse / Fabric Link provides projection. - Power BI queries Fabric. This is CQRS in practice; standard architecture for analytics. ## Cache as read model Simpler form: - Frequently-queried Dataverse data cached. - Cache invalidated on changes. - Reads hit cache; writes go to source. Lightweight CQRS for specific scenarios. **Common pitfalls.** - **Over-engineering.** CQRS where simpler approach sufficed. - **No clear projection strategy.** Read side built ad-hoc. - **Consistency assumptions wrong.** Code assumes strict; gets eventual. - **Projection lag too long.** Reads stale beyond tolerance. - **Schema drift.** Write and read models diverge. - **No monitoring of projection health.** Lag invisible until users complain. **Best practices.** - **Use case-driven.** Apply CQRS where pattern fits, not because it's fashionable. - **Define consistency model.** Be explicit about read freshness. - **Schema discipline** in both models. - **Monitor projection latency.** - **Recovery / rebuild capability** — rebuild read from write if needed. **Performance implications.** - **Write performance** — slightly slower due to projection trigger. - **Read performance** — significantly faster, well-tuned. - **Storage cost** — duplicated data. Net positive for read-heavy workloads; may be net negative for write-heavy. **Operational implications.** - **More moving parts** — more to monitor. - **More dependencies** — projection can fail. - **More expertise needed** — more patterns to understand. Operational cost real; weigh against benefit. ## Strategic positioning CQRS is a powerful pattern for the right problem. Dynamics 365 implementations regularly use CQRS principles without naming it — Synapse Link, semantic models, search indexes are all read-side projections. Naming the pattern enables intentional design. For architects: - Recognise CQRS opportunities (read-heavy, multi-consumer patterns). - Choose appropriate projection technology. - Define consistency expectations. - Plan operational support. For greenfield analytics or customer-facing query workloads, CQRS principles produce better architectures. For simple operational systems, traditional CRUD remains right. Match pattern to problem. --- # Data integration for real-time marketing How real-time marketing journeys consume external data — trigger events, custom triggers from external sources. Source: https://www.solvingdynamics365.com/guides/real-time-marketing-data-integration Section: Integrations / Data movement Published: 2026-05-01 A journey responds to events. A high-quality journey responds to **the right events at the right moments**. That depends on data flowing into Customer Insights — Journeys from across the marketing and operational stack: ecommerce platforms, web analytics, mobile apps, transaction systems, support cases. Designing the data integration is half the work of building a marketing programme. **Event types.** - **System events** — built into Customer Insights — Journeys (email opened, link clicked, form submitted). - **Dataverse events** — record changes in any Dataverse table. - **Custom triggers** — externally defined events emitted from any source. Custom triggers are the integration extension point — anything that happens in any system can trigger a journey if it emits a custom trigger. **Custom trigger anatomy.** - **Trigger definition** — name, schema of properties. - **Properties** — typed fields (string, number, datetime, etc.). - **Audience binding** — how the trigger identifies the recipient. - **Description** — human-readable purpose. Example: a "Cart Abandoned" trigger with properties `cartValue`, `cartItems`, `abandonedAt`, identified by `customerId` mapping to a contact in Customer Insights. **Emitting a custom trigger.** - **Power Automate** — `Send a custom event` action. - **REST API** — direct POST to the journey API. - **Dataverse plug-in** — fires from server-side logic. - **Azure Function** — fires from custom event source. The pattern: source system emits trigger → journey processes immediately. **Authentication for trigger emission.** - API key (simpler, less secure). - Service principal OAuth (preferred for production). - Power Automate uses connector credentials. For high-volume emissions, rate limiting applies; design for graceful backoff. ## Unified profile from Customer Insights — Data When CI-Data is paired with CI-Journeys: - CI-Data unifies customer profiles across multiple sources (CRM, ecommerce, transactional). - The unified profile is the audience for journeys. - Profile attributes are usable in personalisation. Without CI-Data, CI-Journeys uses Dataverse contacts as the audience — simpler but less powerful for cross-system unification. **Common integration patterns.** - **Ecommerce → CI-Journeys** — order placed, cart abandoned, browsed but not purchased. - **Mobile app → CI-Journeys** — app opened, feature used, in-app conversion. - **Support system → CI-Journeys** — case opened, case resolved, NPS score. - **CRM (Dynamics or Salesforce) → CI-Journeys** — opportunity stage change, contract signed. - **Web analytics → CI-Journeys** — page viewed, video watched, content downloaded. Each integration is a source emitting custom triggers, mapped to the unified profile. ## Profile enrichment Beyond triggers, profile data flows from sources: - **Static attributes** — name, email, country. - **Behavioural** — engagement scores, recent activity. - **Transactional** — total spend, average order value. - **Inferred** — segments, propensity scores. CI-Data computes these; CI-Journeys consumes them. **Real-time vs batch.** - **Real-time triggers** — event arrives, journey starts within seconds. - **Batch updates** — profile attributes updated via daily refresh. Both are needed: real-time for event-driven engagement; batch for profile maintenance. ## Webhooks for ingestion A common pattern: - External system POSTs a webhook on event. - Azure Function receives, validates, transforms. - Azure Function calls CI-Journeys API with the custom trigger. The Azure Function provides: - Authentication abstraction. - Schema validation. - Idempotency. - Error handling and retry. Building this once and reusing for all integration points is more maintainable than per-source custom code. ## Identity resolution A challenge: matching event-source identity to the unified profile. - **Source identifies by email** → email match. - **Source identifies by external ID** → mapping table. - **Anonymous events** → cookie / device ID → eventual profile association. CI-Data has identity resolution logic; CI-Journeys benefits from it via the unified profile. ## Schema management Custom triggers have schemas: - **Versioning** — when adding properties, version the trigger. - **Required vs optional** — required properties block emission if missing. - **Documentation** — what each property means, what valid values are. Without governance, schemas drift; emitters and journeys get out of sync. **Volume and throttling.** - Custom trigger emission has rate limits. - High-volume scenarios need batching or queuing. - Marketing-grade volume (millions of events per day) needs careful architecture. **Common pitfalls.** - **No deduplication.** Same event emitted twice; recipient gets two journey instances. - **Identity mismatch.** Event has email but unified profile has phone; no association; journey doesn't fire. - **Schema drift.** Emitter changes property; journey breaks silently. - **No monitoring.** Events missing; journeys not firing; nobody notices until campaign metrics drop. - **Privacy missing.** Event includes personal data without proper consent; compliance issue. - **Source-side failures cascade.** Source system down; events lost; backfill complex. ## Privacy considerations Every event flowing into CI-Journeys may contain personal data: - **Consent** — recipient consented to processing. - **Retention** — events retained per policy. - **Purpose limitation** — events used only for the consented purposes. - **Subject access requests** — events included in DSARs. Build privacy into integration from day one; retrofit is hard. **Observability.** - **Trigger emission logs** — count, success rate, latency. - **Journey entry counts** — vs triggers emitted. - **Failure investigation** — when journeys don't fire as expected. ## Strategic positioning Marketing automation's value compounds with data quality and integration breadth. A journey responding to one event is fine; a journey responding to a coordinated set of behavioural and transactional events across the customer lifecycle is powerful. The investment in clean, reliable, observable data integration is what makes marketing programmes scale beyond simple email campaigns into orchestrated customer experiences. --- # Data lake export for Dynamics 365 Finance and Operations How F&O publishes data to Azure Data Lake — Bring Your Own Database (BYOD) legacy pattern, Export to Data Lake, Synapse Link for F&O, and Fabric Link for D365. Source: https://www.solvingdynamics365.com/guides/data-lake-export-for-dynamics-365-finance Section: Integrations / Data movement Published: 2026-05-01 For analytical workloads against Dynamics 365 Finance and Operations, the export-to-lake pattern has evolved through multiple iterations. Knowing which one is current — and which is deprecated — matters for new investments and existing migrations. **The progression.** - **BYOD (Bring Your Own Database)** — original pattern; F&O exports data entities to a customer-owned Azure SQL Database. Legacy; being phased out. - **Export to Data Lake** — wave 2 2020; replaces BYOD for ADLS-based analytics. Currently in maintenance mode. - **Synapse Link for Dataverse with F&O integration** — wave 2 2023+; surfaces F&O data through the Dataverse Synapse Link. - **Fabric Link for D365** — wave 2 2024+; the current strategic direction. For new deployments, target Fabric Link. For existing BYOD/Export to Data Lake, plan migration. ## BYOD (legacy) F&O exports selected data entities to an Azure SQL Database the customer provides: - Configurable per entity (full or incremental). - Scheduled refresh. - Customer's responsibility to manage the SQL Database. - Power BI, Power Query, or other tools connect to the SQL. Pros: SQL is familiar; customer controls. Cons: SQL cost; not modern lake-based; deprecation announced. ## Export to Data Lake F&O exports to Azure Data Lake Storage Gen2: - CSV files per entity. - Common Data Model (CDM) folder structure. - Refresh on schedule or near-continuous. - Synapse SQL serverless queries the files. Pros: Lake-native; columnar potential. Cons: CSV is suboptimal; CDM folder format somewhat dated; in maintenance mode. ## Fabric Link for D365 The current best-practice path. From the F&O side: - Configure Fabric Link in F&O admin. - Select entities to replicate. - Data lands in OneLake as Delta Parquet. - Available immediately in Fabric Lakehouse and Warehouse. Pros: Modern format; OneLake-native; Direct Lake-ready; integrated with Fabric semantic models. Cons: Fabric capacity required; newer feature evolving. ## Data scope Both Export to Data Lake and Fabric Link surface: - F&O data entities (the same ones used for integration). - Selectable per entity. - Both initial bulk and incremental updates. - Field-level granularity. The export catalog is large; choosing which entities to replicate is curation work. **Performance and latency.** - **BYOD** — refresh based on configured schedule, typically minutes to hours. - **Export to Data Lake** — similar; minutes between batch flushes. - **Fabric Link** — continuous delta; minutes from change to availability. For most reporting workloads, any of these is fast enough. Real-time operations against F&O data require different approaches. **Schema considerations.** - F&O entities are denormalised views over underlying tables. - Replication preserves the entity structure. - Joins between entities happen at query time in the lake. - Underlying F&O tables (e.g., CustTable, VendTable) are not directly replicated; only their entities. For some advanced scenarios, table-level replication via direct database access is needed; this is unsupported and avoided. **Query patterns.** - **Synapse SQL serverless** — `SELECT * FROM OPENROWSET(...)`. - **Fabric Warehouse** — T-SQL over OneLake Delta tables. - **Fabric Lakehouse** — SQL endpoint over Lakehouse. - **Spark notebooks** — for advanced transformations. - **Power BI** — semantic models in Direct Lake mode. The unified Fabric experience makes the queries simpler than the older Synapse Link pattern. **Combining F&O and Dataverse data.** - Customer 360 reporting needs F&O sales + Dataverse CRM data. - Both replicated to the same OneLake. - Join at query time across the two. - Single semantic model or warehouse model unifies them. This unification is the strategic value of OneLake — heterogeneous data sources made queryable as one. **Security.** - Lake-side security is file/folder based. - F&O row-level security doesn't carry over. - Sensitive entities need separate restricted containers or column-level masking. - Audit access to lake to ensure compliance. **Cost.** - **BYOD** — Azure SQL Database cost; meaningful. - **Export to Data Lake** — ADLS storage; relatively cheap. - **Fabric Link** — Fabric capacity consumption. Per gigabyte, the modern lake-based options are cheaper than BYOD's SQL. Fabric Link bundles cost into Fabric capacity, which has its own economics. **Migration paths.** - **BYOD to Fabric Link** — re-implement reports against Fabric Lakehouse; gradual cutover. - **Export to Data Lake to Fabric Link** — Microsoft provides guidance; migration tools emerging. - **Direct database access (unsupported) to Fabric Link** — refactor to entity-based; significant work. **Common pitfalls.** - **Sticking with BYOD past EOL.** Eventually unsupported; migration becomes forced. - **All entities replicated.** Storage and cost explode; query performance suffers from clutter. - **Schema changes in F&O broken downstream.** Pipeline picks up new fields; reports fail unless monitored. - **Performance not tuned.** Lake queries slow; complaints; investigation reveals partitioning or compression issues. - **No data lineage.** Reports reference replicated data without traceability to F&O source; auditor questions impossible to answer. **Operational rhythm.** - **Daily** — verify replication freshness; check for failures. - **Monthly** — review entity selection; retire unused replications. - **Quarterly** — performance review; cost analysis. - **Annually** — strategy review; align with Microsoft's direction. ## Strategic positioning F&O analytics has been a moving target across Microsoft's data strategy. The current direction is unambiguous: OneLake-based, Fabric-integrated. For organisations early in their F&O analytics journey, jump to Fabric Link directly. For organisations on BYOD or Export to Data Lake, plan migration on a 12–24 month horizon. The destination is clear; the path matters less than committing to start the journey. --- # Dataverse plug-ins vs Power Automate The decision between a C# plug-in and a Power Automate flow for integration logic in Dataverse — transactions, latency, throughput, ownership. Source: https://www.solvingdynamics365.com/guides/integrating-with-dataverse-plug-ins-vs-power-automate Section: Integrations / Architecture patterns Published: 2026-09-02 Every Dataverse project reaches the moment where something needs to happen when a record changes, and someone has to decide whether that something is a plug-in or a flow. Both can call external systems, both can update Dataverse, and both have partisans. The decision is not about skill or taste. It is about where the logic needs to run relative to the database transaction, how fast it must be, how much of it there is, and who will own it in three years. ## The one difference that decides most cases A plug-in registered synchronously runs inside the Dataverse transaction. If it throws, the user's save fails and nothing is written. A Power Automate flow runs after the transaction has committed, on its own schedule, with no ability to stop the save. That single fact sorts a surprising amount of integration logic. If the external system must agree before the record is allowed to exist (a credit check before an order is created, a tax engine validation before an invoice is saved, an address validation before an account is committed), it is a synchronous plug-in. Nothing else can veto the save. See [the plug-in execution pipeline](https://www.solvingdynamics365.com/guides/dataverse-plugin-execution-pipeline) for what runs when. If the external system just needs to hear about the change (notify a shipping system, push a contact to a marketing tool, log to a warehouse), it is a flow, or an asynchronous plug-in, or better still an event on a queue. Blocking the user's save while a marketing API answers is a design error, however it is implemented. ## When plug-ins win - **Veto logic** as above. - **Latency-sensitive updates** that the user expects to see immediately on the same form, such as a calculated field derived from an external rate. - **High volume.** Thousands of record changes an hour will exhaust Power Automate's run and action limits and cost real money per run. A plug-in costs nothing per execution. - **Complex logic** that is painful to express in a visual designer: recursion, heavy string handling, anything with more than a handful of branches. - **Impersonation and elevated operations** that need to run as a specific user or bypass a user's permissions in a controlled way; see [impersonation in plug-ins](https://www.solvingdynamics365.com/guides/dataverse-impersonation-in-plugins). ## When Power Automate wins - **Fire-and-forget notifications** to external systems where a delay of seconds to minutes is fine. - **Connector-heavy work.** If the job is "put a row in SharePoint, send a Teams message, and create a ticket in ServiceNow", the connectors exist and the flow is done in an hour. The equivalent plug-in involves three authentication schemes and three SDKs. - **Approval and human-in-the-loop processes.** Plug-ins cannot wait for a person. - **Scheduled work** on a cadence rather than on an event. Plug-ins do not have timers. - **Ownership by makers.** If the team that will maintain this is functional rather than developer, a flow they can read beats a plug-in they cannot. ## The trap in the middle Asynchronous plug-ins occupy the space between the two: code, but off-transaction, executed by the async service with retries. They are the right choice for post-commit logic that is too heavy or too frequent for flows, and the wrong choice when what you actually want is a durable queue, because the async service is not one. For anything that crosses a system boundary and must not be lost, the honest pattern is plug-in writes to a Service Bus queue or an outbox table, and a consumer does the integration; see [the outbox pattern with Service Bus](https://www.solvingdynamics365.com/guides/the-outbox-pattern-with-service-bus). The other trap is calling an external HTTP endpoint from a synchronous plug-in "just this once". The two-minute execution limit, the sandbox restrictions, and the fact that a slow third party now slows every user save mean this should be a last resort with a tight timeout, not a habit. ## Low-code plug-ins Dataverse also offers [low-code plug-ins](https://www.solvingdynamics365.com/guides/low-code-plug-ins-in-dataverse) written in Power Fx, which run in the transaction like C# plug-ins but are authored by makers. They cover simple validation and calculation well and are not yet a serious integration tool; the external-call story is through connectors and is limited. Treat them as a third option for the light end of the plug-in use cases, not as a replacement for either. ## Cost and licensing Flows consume Power Platform request limits and, depending on licensing, per-flow or per-user entitlements. Plug-ins consume Dataverse API request allowances but no per-run charge. At low volume the difference is invisible; at high volume flows become the expensive option and the throttled one. ## Testability and ALM Plug-ins have unit tests, source control, and a build pipeline, if the team sets them up, and are deployed in solutions like anything else. Flows live in solutions too, can be exported and imported, but testing is largely manual and version history is thin. A regulated environment that needs auditable change control tends to lean plug-in for anything critical. See [solution import and export pipelines](https://www.solvingdynamics365.com/guides/solution-import-export-pipelines). ## A working rule Inside the transaction, or high volume, or complex: plug-in. After the transaction, connector-shaped, human-involved, or maker-owned: flow. Crossing a system boundary with data that must not be lost: neither directly; queue it. If two people on a project disagree, the disagreement is almost always because they have not agreed which of those buckets the requirement is in. ## Stability verdict Both tools are mature and neither is going anywhere. The unstable part is the boundary: teams that build integrations as flows because it was quick, then hit limits, then rewrite as plug-ins, then find they wanted a queue. Decide the bucket first. For the underlying mechanics, see [Dataverse plug-ins explained](https://www.solvingdynamics365.com/guides/dataverse-plug-ins-explained) and [Power Automate connectors for Dynamics 365](https://www.solvingdynamics365.com/guides/power-automate-connectors-for-dynamics-365). ### Frequently asked questions **What is the one difference that decides most cases?** A synchronous plug-in runs inside the Dataverse transaction and can veto the save; a Power Automate flow runs after the commit and cannot. If an external system must agree before the record exists — credit check, tax validation, address validation — it is a plug-in. **When does Power Automate win?** Fire-and-forget notifications, connector-heavy work across SharePoint, Teams, and ServiceNow, approvals and human-in-the-loop steps, scheduled jobs, and anything a functional maker will own. Plug-ins cannot wait for a person and have no timers. **What about asynchronous plug-ins?** They suit post-commit logic too heavy or too frequent for flows, but the async service is not a durable queue. For anything crossing a system boundary that must not be lost, write to a Service Bus queue or an outbox table and let a consumer integrate. **How do costs compare at volume?** Flows consume Power Platform request limits and per-run entitlements and become expensive and throttled at thousands of changes an hour. Plug-ins consume Dataverse API allowances with no per-execution charge. --- # Dataverse row-level security for Entra ID B2B guest users How to give partners, contractors, and customers direct Dynamics 365 access as Entra B2B guests without exposing more than their own rows — licensing. Source: https://www.solvingdynamics365.com/guides/integrating-dataverse-security-with-entra-b2b-guests Section: Integrations / API & identity Published: 2026-09-02 A distributor needs to see the opportunities they are working with you on. A contractor needs to update the work orders assigned to their crew. A large customer wants their own project manager in your project system. Each of these people is outside your organisation, and the tempting shortcut is to invite them as an Entra ID B2B guest and give them a Dynamics 365 licence. It can work well. It can also become the audit finding of the year, because guests inherit the same Dataverse security model as employees, and that model only restricts what you tell it to. ## What a B2B guest is in Dataverse terms An Entra B2B guest is an external identity, from another Entra tenant or a consumer account, invited into your tenant. Once invited, the guest can be assigned a Dynamics 365 or Power Apps licence and added to a Dataverse environment like any user. Inside Dataverse there is no such thing as a "guest": they are a system user with security roles, a business unit, and team memberships, and they see exactly what those grant. The word "guest" is an Entra concept, not a Dataverse one. That is the point to internalise. If a guest is given the standard Salesperson role, they see every account and opportunity the role grants, across the whole business unit. Nothing about being external limits them. ## Building the fence Row-level security for guests comes from the same three tools as for anyone else, used deliberately. **A dedicated business unit per external organisation.** Create a business unit for each partner or customer that gets guests, place the guests in it, and give them roles whose read and write privileges are set to Business Unit depth, not Organization. They then see only rows owned by users or teams in their business unit. This is the coarsest and most reliable fence, and it is the one to start with. See [hierarchical security](https://www.solvingdynamics365.com/guides/hierarchical-security-in-dataverse) for how depth works. **Ownership by a team in that business unit.** Rows the guests should see must be owned by, or shared with, something in their business unit. The usual pattern is an owner team per partner; when an opportunity is assigned to that partner, the owner is set to the team, and the guests see it. Rows owned by your employees in the root business unit are invisible to the guest, which is what you want. See [owner teams vs access teams](https://www.solvingdynamics365.com/guides/owner-teams-vs-access-teams-in-dataverse). **Access teams for row-by-row sharing.** When a guest should see one specific record without owning it (a project they are staffed on, a case they are consulted on), an access team template on the table lets you add them to that row alone. This is finer-grained and more work to administer; use it for exceptions, not for the bulk of access. Then close the side doors. Guests should have no privileges on tables they do not need, including the ones the standard roles grant liberally: notes, activities, connections, and the system tables that leak names. Column-level security hides fields such as margins and internal notes; see [field-level security](https://www.solvingdynamics365.com/guides/field-level-security-in-dataverse). And check the app: a model-driven app shared with the guest shows every table in its sitemap that the role permits, so build a separate, minimal app for external users. ## Conditional access and device posture Guests arrive from devices and networks you do not manage. Entra conditional access policies can require multifactor authentication for guests, restrict them to browser access, block downloads, or require the partner's tenant to satisfy cross-tenant trust settings. Apply a guest-specific policy; the employee policy assumptions do not hold. Our guide on [Dynamics 365 and conditional access](https://www.solvingdynamics365.com/guides/dynamics-365-and-conditional-access) covers the mechanics. ## Licensing A guest using a model-driven Dynamics 365 app needs the same licence an employee would for that app. There is no guest discount. For a handful of partner managers that is fine. For hundreds of contractor field technicians it is not, and the licence bill becomes the argument for a portal instead. ## When guests are the wrong tool Guests suit a small number of trusted, named external users who need the full app experience and will be trained on it. They do not suit large populations, anonymous or self-registering users, or anyone whose access must be scoped to their own data by design rather than by administration. For those, the alternatives are [Power Pages](https://www.solvingdynamics365.com/guides/power-pages-for-customer-portals) with Entra External ID or B2C authentication, where table permissions scope access to the signed-in contact's own rows and the licensing is per authenticated user or per capacity, or a custom application in front of the Dataverse API with its own authorisation. See [Entra External ID for customer access](https://www.solvingdynamics365.com/guides/entra-external-id-for-customer-access) for the identity side. The rule of thumb: named partners inside the app, populations through a portal. ## What breaks in practice Guests placed in the root business unit "for now". Standard roles copied and assigned without trimming. Records reassigned from a partner team to an employee, which removes the partner's visibility with no warning. Guests whose home tenant deprovisions them but who remain licensed and enabled in yours; tie guest lifecycle to a review process. Reports and Power BI dashboards shared to guests that bypass Dataverse security entirely. ## Stability verdict The security model itself is stable and does exactly what it is configured to. The instability is administrative: every new partner needs a business unit, a team, a role check, and an app share, and the first time someone skips a step a guest sees too much. Automate the onboarding with a flow or a script, review guest access quarterly, and keep the population small. For the model behind all of this, read [the Dataverse security model](https://www.solvingdynamics365.com/guides/dataverse-security-model). --- # Dual-write troubleshooting patterns The failures that recur on every dual-write implementation between Finance and Operations and Dataverse — initial sync stalls, map errors, reference data gaps. Source: https://www.solvingdynamics365.com/guides/integrating-with-dual-write-troubleshooting-patterns Section: Integrations / Resilience & ops Published: 2026-09-02 Dual-write works, in the sense that once it is running cleanly it keeps customers, products, and orders aligned between Finance and Operations and Dataverse with very little attention. Getting it to run cleanly is the part that consumes weeks, and the same handful of failures account for most of that time. This guide is about those failures and the order in which to look for them. For what dual-write is and when to use it at all, start with [Dynamics 365 dual-write integration](https://www.solvingdynamics365.com/guides/dynamics-365-dual-write-integration) and [master data services vs dual-write](https://www.solvingdynamics365.com/guides/master-data-services-vs-dual-write). ## First principle: reference data before transactional data Almost every dual-write failure in a new environment is a reference-data failure wearing a transactional disguise. A customer map fails because the customer group does not exist in Dataverse. A sales order map fails because the currency, the unit of measure, or the site was never synced. Dual-write is strict about lookups: if the row a lookup points to has not been synced, the record fails. Microsoft publishes the map dependency order. Follow it literally: legal entities and companies, then currencies, units, countries and other reference tables, then parties and customers and vendors, then products, then transactions. Run initial sync in that order, one map at a time for the first pass, and check each one is clean before starting the next. Running everything at once and then reading the error log is slower, not faster. ## Initial sync failures Initial sync stalls or fails for a small number of reasons. **Volume.** Large tables time out. The fix is to sync in batches by filter (by legal entity, by date range, by customer group) rather than the whole table, and to run initial sync during a quiet window for F&O, since it competes with batch jobs. **Lookup gaps** as above. The error message names the missing reference; go and sync that map first. **Data quality on the F&O side.** Customers with blank mandatory fields, products without a default unit, records that would fail F&O's own validation if re-entered. Dual-write applies validation on write, and legacy data that F&O tolerated in place fails on the way out. Cleanse first or filter the map to exclude the offenders and deal with them separately. **Integration key conflicts.** If the same customer exists in both systems from earlier manual entry and the keys do not match, initial sync either creates duplicates or fails on alternate-key violations. Decide which system is authoritative per table before the first sync, and align keys with a one-off data fix. ## Live sync failures Once live, failures surface in the dual-write error log and in the Dataverse integration error tables. The recurring ones: **Company context.** F&O records belong to a legal entity; Dataverse rows carry a company lookup. A user creating an account in Dataverse without a company, or with the wrong one, fails the write to F&O. The fix is usually a default company on the Dataverse form and, in mixed landscapes, a business rule that makes it mandatory. **Ownership and security.** The integration user needs rights on both sides. A new table added to a map, a new security role, or a field-level security profile on Dataverse can silently block writes. When a map that worked yesterday fails today, check permissions before anything else. **Field mappings after customisation.** A new mandatory field on either side, added by a developer who did not know dual-write existed, fails every write until the map is updated with a default or a transformation. Dual-write map changes go through the same ALM as everything else; treat them as part of the release. **Concurrent edits.** Both systems can write the same record within seconds, and dual-write is not a conflict resolver. Choose a system of record per table and enforce it with read-only forms or field security on the other side; see the [master data services comparison](https://www.solvingdynamics365.com/guides/master-data-services-vs-dual-write) for the reasoning. **Environment lifecycle.** A refreshed sandbox, a restored Dataverse environment, or an F&O database movement breaks the link. Relinking and re-running initial sync for affected maps is part of any refresh runbook. ## A diagnostic order that works 1. Is the environment link healthy? Check the dual-write admin page in Finance and Operations for the connection state before reading any error. 2. Is the map running? A stopped map fails silently from the user's perspective. 3. What does the error say, exactly? Dual-write errors are verbose and usually name the table and field. Read to the end. 4. Does the referenced lookup exist on the target side? If not, sync it. 5. Did anything change: a security role, a new field, a solution import, an F&O update? Correlate with the change calendar. 6. Reproduce with one record through the UI, with the integration user's permissions, and watch the error in real time. ## Operational hygiene Alert on the error tables rather than waiting for users. A small Power Automate flow that emails when the Dataverse integration error count rises is cheap. Review and clear the error log weekly; an error log with ten thousand stale entries hides the new ones. Keep a document of which maps are active, which are customised, and why. Version the map customisations with the solution. Performance-wise, dual-write adds latency to saves on both sides because the write is synchronous. Users notice on tables with heavy maps. Keep maps lean, avoid mapping fields nobody uses, and test save times on the busiest forms with dual-write on. ## What dual-write is not for High-volume transactional data. Mapping every inventory transaction or every journal line through dual-write will hurt both systems. Use it for master data and the handful of documents that need to be visible on both sides, and use [Synapse Link](https://www.solvingdynamics365.com/guides/azure-synapse-link-for-dataverse) or an eventing pipeline for the rest. ## Stability verdict Stable once the reference-data foundation is right and the system-of-record rules are enforced. Unstable, and permanently noisy, when it is switched on over unclean data or asked to arbitrate between two systems that both think they own the customer. --- # EDI with Business Central How EDI integration works with Business Central — direct EDI vendors, AppSource connectors, document mapping, and the trade partner setup. Source: https://www.solvingdynamics365.com/guides/edi-with-business-central Section: Integrations / Data movement Published: 2026-05-01 EDI — Electronic Data Interchange — remains the backbone of B2B trading between manufacturers, distributors, and retailers. Business Central doesn't ship EDI capability out of the box, but the integration story is well-established and based on a small number of patterns. ## The shape of EDI Trading partners exchange structured business documents — purchase orders (850), order acknowledgments (855), advance ship notices / ASNs (856), invoices (810) in the American X12 format, or **ORDERS, ORDRSP, DESADV, INVOIC** in EDIFACT. Documents travel over **AS2, SFTP, VAN, or AS4** transport. Each trading partner has slightly different requirements; standardised on paper, varied in practice. ## The Business Central path Three real options. 1. **AppSource EDI connectors.** Several ISVs publish packaged EDI modules — *Lanham EDI*, *EDICOM for BC*, *Pagero, TIE Kinetix*, others — that install into Business Central and provide a configuration UI for partner setup, message mapping, document send/receive, and audit. The most common pattern for SMBs. The connector handles transport, parsing, mapping, and integration with BC's sales/purchase document objects. 2. **External EDI service providers.** Use a dedicated EDI service (SPS Commerce, OpenText GXS, IBM Sterling, TrueCommerce) that handles transport and translation, and integrate to BC via a lightweight bridge — typically file drops, REST API, or an ISV connector. Common when the trading partners require an established EDI provider, or when the volume is too high for in-platform processing. 3. **Custom integration.** Write AL code or a Logic Apps workflow that translates EDI documents to BC records. Cheap to start, painful to maintain across hundreds of partner-specific variations. Rarely the right answer beyond a very small footprint. ## Trading partner setup For each partner, the EDI module captures: the trading partner's EDI identifier (DUNS, GLN, custom code), the document types exchanged (PO, ASN, Invoice), the maps from partner format to BC document fields, sequence number ranges, time-of-day expectations, and acknowledgment requirements. ## Inbound POs A partner sends an 850/ORDERS. The EDI module receives it, validates, and creates a **sales order** in BC with the partner as the customer. Item-number mapping (partner's part number → BC item number) is critical and partner-specific. Errors stage for review. ## Outbound ASNs and Invoices When BC posts a shipment, the EDI module generates an 856/DESADV and sends it; same for invoices. ## Compliance Retail and automotive partners often impose **chargebacks** for late or malformed EDI — slipped ASNs after shipment, missing fields, incorrect GTINs. Monitoring and exception handling are non-negotiable. ## Operational reality EDI is unglamorous infrastructure. Budget for ongoing partner onboarding and map maintenance — every partner is a small project. --- # Entra External ID for customer access How Microsoft Entra External ID provides customer-grade identity for Power Pages portals and external Dynamics 365 access — sign-up flows, branding. Source: https://www.solvingdynamics365.com/guides/entra-external-id-for-customer-access Section: Integrations / API & identity Published: 2026-08-03 For customer-facing portals built on Power Pages — or any scenario where external users need to authenticate to access Dynamics 365 resources — the identity provider is **Microsoft Entra External ID**. Successor to **Azure AD B2C**, External ID provides customer-grade identity: branded sign-up flows, social identity, MFA, and the scale to handle millions of consumer users without overloading the workforce-focused Microsoft Entra ID directory. **The model.** External ID is a separate tenant from your workforce Entra ID: - **Workforce tenant** — employees, contractors, internal users. The standard Microsoft 365 / Entra ID directory. - **External tenant** — customers, partners, citizens. Separated for isolation, scale, and customer-grade flows. Users in the external tenant don't have Microsoft 365 licenses, internal access, or workforce identity overhead. They exist purely as external identities for accessing customer-facing resources. ## Identity providers External ID accepts identity from multiple sources: - **Email / password** — locally-managed accounts. - **Microsoft account** — using a personal Microsoft account. - **Google, Facebook, Apple, LinkedIn, Twitter** — social identity providers. - **Any OpenID Connect / SAML 2.0 provider** — for federated identity from a partner organisation. Customers sign up with whichever identity works for them; the External ID maintains a unified user record. ## User flows A **user flow** is a configured authentication / registration experience: - **Sign-up and sign-in flow** — the most common; users register or sign in. - **Sign-up only** — for registration-only scenarios. - **Password reset** — self-service password reset. - **Profile editing** — let users update their own data. Each flow has configurable steps — attributes to collect, MFA requirements, consent screens, branding. ## Branding External ID supports per-application branding: - Custom logo and colours. - Custom HTML pages for sign-in / sign-up. - Multi-language support. - Custom domain (e.g. `auth.contoso.com`) instead of the Microsoft-default URL. Customers see a branded experience that feels like part of your product, not a Microsoft service. ## MFA Configurable per user flow: - **Always required** — high-security scenarios. - **Conditional** — based on risk signals, location, sensitive operations. - **Optional** — user can enable. MFA methods include SMS, email OTP, authenticator apps. ## Custom attributes Beyond standard attributes (email, name), define custom attributes for capture at sign-up: - Company name. - Customer reference number. - Region / language. - Communication preferences. - Custom JSON for complex data. Stored on the External ID user; flows back to the integrated systems (Power Pages, Dataverse) on authentication. ## Custom policies For advanced scenarios beyond user-flow capability, External ID supports **custom policies** — XML-based identity orchestration that can include: - Multi-step verification (email + phone + ID document). - Integration with external identity verification services. - Complex conditional logic. - Custom claims transformation. Custom policies are powerful but complex; reserve for genuine business needs. ## Integration with Power Pages Power Pages portals can use External ID as their identity provider: 1. In the Power Pages site settings, configure External ID as an authentication provider. 2. Map the External ID flow to portal sign-in / sign-up paths. 3. Map External ID attributes to Power Pages contact records (Dataverse). 4. Portal authenticated sessions get Dataverse-side identity automatically. The pattern: customer signs up through External ID; their record creates / matches a Contact in Dataverse; they get portal access scoped to their data. **Migration from Azure AD B2C.** External ID is the modern successor to **Azure AD B2C**. Microsoft has signaled long-term migration paths: - B2C tenants continue running. - New external-identity scenarios should target External ID. - Migration tools assist moving B2C user populations to External ID. For existing B2C-based Power Pages or custom-app deployments, gradual migration over months is the typical path. ## Pricing External ID is billed by **monthly active user (MAU)** — the number of unique external users authenticating in the month. Tiers offer different feature levels; sized per expected user scale. **Security and compliance.** - **GDPR compliance** — External ID handles customer PII with appropriate controls. - **Audit logs** — sign-in events, profile changes, MFA events. - **Conditional Access** — apply policies based on risk signals. - **Identity Protection** — Microsoft detects unusual sign-in patterns. **Common pitfalls.** - **B2C used where External ID would suit** — older docs still reference B2C; for new builds, prefer External ID. - **Branding skipped** — users see "Sign in with Microsoft" branding; jarring. - **No MFA on customer access** — increases account-takeover risk. - **Attribute structure not thought through** — adding attributes after launch is more friction than getting them right upfront. ## Operational reality External ID is the canonical answer for customer-facing identity in the Microsoft cloud. Plan for it deliberately; treat it as production infrastructure; tune branding and flows based on user feedback. --- # Event Grid with Dataverse How Azure Event Grid integrates with Dataverse — schema, subscribers, when to use Event Grid vs Service Bus, and operational patterns. Source: https://www.solvingdynamics365.com/guides/event-grid-with-dataverse Section: Integrations / Eventing & messaging Published: 2026-05-01 **Azure Event Grid** is Microsoft's pub/sub eventing service for cloud-scale fan-out. Where Service Bus is durable queueing for transactional messaging, Event Grid is lightweight, high-throughput, multi-subscriber event distribution. Dataverse supports publishing change events to Event Grid, giving access to a fundamentally different integration pattern than the older Service Bus path. ## The model Each Dataverse change event is published to an **Event Grid topic** as a structured event message. Multiple **subscribers** can independently subscribe to the topic with their own filters. Each subscriber receives the events it filtered for, processed independently of all other subscribers. If a subscriber is down, the others are unaffected; if a subscriber is fast, the others don't slow it. ## Event schema Dataverse-emitted events follow the CloudEvents v1.0 schema with a Dataverse-specific data payload: ```json { "id": "GUID", "source": "dataverse-environment-url", "type": "Microsoft.Dataverse.RecordCreated", "time": "ISO timestamp", "data": { "entity": "account", "recordId": "GUID", "userId": "GUID", "changes": { ... } } } ``` The event metadata is intentionally lightweight — most subscribers fetch the actual record from Dataverse on receipt rather than relying on the event payload alone. ## Subscribers Event Grid supports many subscriber types out of the box: - **Azure Functions** — most common. Trigger on event, process, ack. - **Logic Apps** — event triggers a Logic App workflow. - **Webhook** — HTTP endpoint that receives the event POST. - **Service Bus queue or topic** — chain Event Grid to durable queueing for resilient processing. - **Event Hubs** — high-throughput streaming. - **Storage queues** — for simple low-cost queueing. - **Hybrid Connections** — on-premise endpoints. ## Filtering Subscribers can filter events on type, entity name, or attribute values. So one subscriber processes only Account changes; another processes only changes where Status = "Active". Reduces the work each subscriber needs to do. ## Reliability Event Grid retries failed deliveries with exponential backoff for up to 24 hours by default (configurable). After exhausting retries, events can be sent to a **dead-letter storage account** for inspection. But Event Grid is not durable to the same level as Service Bus — multi-day outages of a subscriber are not the right use case. ## Throughput Event Grid scales to millions of events per second. Suitable for very high-volume Dataverse change streams where Service Bus would be over-provisioned or under-performant. ## Pricing Pay-per-million-events. Generally cheaper than Service Bus at high volume. **Service Bus vs Event Grid for Dataverse.** - **Service Bus**: durable, ordered, point-to-point or limited pub/sub, moderate scale. Right for transactional integrations where every message must be processed by exactly one consumer, eventually, even after outages. - **Event Grid**: pub/sub at scale, many subscribers, eventual consistency, near-real-time, lightweight. Right for fan-out scenarios where many systems should be notified of changes — analytics, search index updates, cache invalidation, low-volume side processes. ## Hybrid pattern Many architectures use both: Event Grid for fan-out to subscribers that care, with one Event Grid subscriber being a Service Bus queue for the transactional consumer. ## Operational reality Event Grid integrations look elegant on paper but require disciplined subscriber operation — every subscriber must be observable, with dead-letter handling and alerting. Without that discipline, dropped events go unnoticed. ## Choosing for Dynamics 365 For most Dataverse integrations, Service Bus is the safer default. Reach for Event Grid when: - You need many independent subscribers. - Throughput is high enough that Service Bus economics get unfavourable. - Subscribers are lightweight processors that don't need durable queueing. --- # Event-driven architecture for Dynamics 365 How to design event-driven integrations around Dynamics 365 — event sources, brokers, consumers, and the patterns that keep systems loosely coupled. Source: https://www.solvingdynamics365.com/guides/event-driven-architecture-for-dynamics-365 Section: Integrations / Architecture patterns Published: 2026-05-01 A traditional integration calls Dynamics 365 API when data is needed; an event-driven integration is notified when Dynamics 365 changes happen. The shift from request-response to event-driven enables loose coupling, scalability, and real-time reactivity. For complex multi-system landscapes, event-driven architecture (EDA) often outperforms point-to-point integration. **Request-response vs event-driven.** - **Request-response** — caller pulls; tight coupling; synchronous. - **Event-driven** — source pushes; loose coupling; asynchronous. Different problem domains favour different approaches; understanding both helps. **Event-driven components.** - **Event source** — produces events (Dynamics, F&O, external systems). - **Event broker** — routes events (Event Grid, Service Bus). - **Event consumer** — reacts to events. - **Event store** — historical record. Each component does one job; clean separation. **Event types from Dynamics 365.** - **Record changes** — Create, Update, Delete in Dataverse. - **Business events** — F&O business events (workflow completed, etc.). - **Custom events** — emitted by plug-ins or workflows. - **System events** — login, error, etc. Rich event sources; selecting which to publish is configuration choice. **Brokers and patterns.** - **Azure Event Grid** — publish-subscribe; many subscribers per event. - **Azure Service Bus** — queues and topics; reliable delivery. - **Apache Kafka / Confluent** — high-throughput streaming. - **Microsoft Fabric Eventstream** — for analytical workloads. Each has positioning; choose by reliability, throughput, durability needs. **Pub/sub pattern.** - Source publishes event. - Broker notifies all subscribers. - Subscribers process independently. - Adding new subscriber requires no source change. This loose coupling is the headline benefit. **Queue pattern.** - Source publishes to queue. - One consumer processes each message. - Load-balanced if multiple consumers. - Message preserved until processed. For ordered, reliable, single-consumer scenarios. **Event schemas.** - **Defined schema** — known structure. - **Versioned** — schemas evolve. - **Documented** — consumers understand. CloudEvents is a common standardised format; preferred for new designs. **Producer responsibilities.** - **Emit reliably** — even if downstream busy. - **Include context** — IDs, timestamps, source identification. - **Maintain schema** — version changes communicated. - **Idempotency hints** — duplicate detection support. **Consumer responsibilities.** - **Subscribe to relevant events.** - **Process idempotently** — handle duplicates. - **Respect ordering** where needed. - **Handle failures gracefully** — retry, dead-letter. Each side has obligations to make the architecture work. ## Event sourcing A specific pattern: - Store all state changes as events. - Reconstruct current state by replaying events. - Time-travel — see state at any past point. Powerful but heavier; not always needed. ## CQRS (Command Query Responsibility Segregation) Related: - Commands (writes) and queries (reads) separate. - Write side may use events. - Read side optimised for queries. For complex domains with heavy read traffic. **Sagas for distributed transactions.** - Long-running, multi-system process. - Compensating actions if a step fails. - Replaces 2PC (two-phase commit) for distributed. Common pattern for cross-system workflows in Dynamics 365 ecosystem. ## Idempotency Critical: - Events delivered at-least-once. - Duplicates inevitable. - Consumer must handle. Patterns: - **Idempotency key** — same event has same key. - **Inbox table** — track processed events. - **State-based logic** — set state, not increment. Without idempotency, retries cause duplicates. **Event ordering.** - **Strict ordering** — events processed in order published. - **Out-of-order** — order doesn't matter. Strict ordering more expensive; often unnecessary for business logic. **Backpressure.** - Source produces faster than consumer can process. - Queue grows. - Consumer falls behind. Handle via: - **More consumer instances** — scale out. - **Consumer optimisation** — faster processing. - **Producer throttling** — slow source. - **Buffering with TTL** — drop old. **Dead-letter handling.** - Failed messages quarantined. - Investigation and resubmission. - Critical for reliability. Covered in [Message replay and poison queue handling for D365](https://www.solvingdynamics365.com/guides/message-replay-and-poison-queue-handling-for-d365). **Observability.** - **Tracing** — request flow across services. - **Event metrics** — published, consumed, failed. - **Latency** — end-to-end timing. - **Correlation IDs** — link related events. Without observability, debugging event-driven systems is hard. **Common pitfalls.** - **Tight coupling sneaking in.** Consumer needs producer's internal details. - **Schema drift.** Producer changes; consumers break. - **No idempotency.** Duplicates cause data corruption. - **Loose ordering assumed.** Order-dependent logic; bugs surface randomly. - **No dead-letter strategy.** Failed events disappear. - **Synchronous assumptions in async system.** Caller expects immediate result; doesn't get one. **When event-driven wins.** - Many systems consume same data. - Sources are external / hard to call. - Volume is high; pulling expensive. - Loose coupling enables independent evolution. - Real-time matters. **When request-response wins.** - Specific, well-known consumer. - Strong consistency requirement. - Simple query patterns. - Small scale. Both have place; not religious choice. ## Hybrid common Most real architectures: - Some integrations event-driven. - Some request-response. - Pragmatic per integration. ## Strategic positioning Event-driven architecture is the maturing pattern for modern enterprise integration. Dynamics 365 supports it well via plug-ins, business events, and integration with Azure messaging. For organisations with multi-system landscapes, investing in event-driven patterns produces more scalable, maintainable integrations. For architects: - Identify where event-driven fits. - Standardise on a broker. - Establish schema discipline. - Build observability. - Document patterns for re-use. The investment is in foundational infrastructure and patterns; the payback compounds as new integrations leverage the platform. Greenfield architectures should consider event-driven from start; existing point-to-point can refactor gradually. --- # Eventually consistent integrations with Dynamics 365 How to design and operate eventually-consistent integrations — consistency vs availability trade-offs, conflict resolution, and the UX implications. Source: https://www.solvingdynamics365.com/guides/eventually-consistent-integrations-with-dynamics-365 Section: Integrations / Architecture patterns Published: 2026-05-01 Distributed systems often can't guarantee strong consistency without sacrificing availability or performance. **Eventually consistent** systems accept temporary inconsistency in exchange for resilience and scale. For Dynamics 365 integrating with other systems, understanding eventual consistency — when it's acceptable and how to operate it — is essential. **The consistency spectrum.** - **Strong consistency** — all reads see most recent write, immediately. - **Eventual consistency** — all replicas converge eventually. - **Causal consistency** — if A caused B, B isn't seen before A. - **Read-your-own-writes** — user sees their own changes. - **Session consistency** — within a session, consistent view. Different models suit different scenarios. ## The CAP theorem In distributed systems, choose two of three: - **Consistency** — all reads see latest write. - **Availability** — system responds even during partition. - **Partition tolerance** — works despite network failures. Most modern systems are AP (available, partition-tolerant) with eventual consistency. **Where eventual consistency works.** - **Analytics replication** — minutes of lag fine. - **Reporting dashboards** — slight delay acceptable. - **Search indexes** — index can lag behind source. - **CRM master data sync** — typical multi-system sync. **Where eventual consistency hurts.** - **Financial transactions** — bank balance must be accurate. - **Inventory commitments** — overselling unacceptable. - **Real-time decisions** — fraud screening. - **User-visible immediate feedback.** For these, design for consistency, even at cost of availability or scale. **Convergence time.** - **Real-time** — seconds. - **Near-real-time** — minute to few minutes. - **Batch** — hours. Acceptable convergence varies by use case. ## Conflict resolution When two updates conflict: - **Last-write-wins** — based on timestamp. - **Source-priority** — one system always wins. - **Custom logic** — business rules decide. - **Manual** — escalate to human. Each has trade-offs; clear policy beats ambiguous handling. **Last-write-wins risks.** - Clock skew between systems. - Conflicting concurrent updates. - "Lost update" — one update overwrites another. Use timestamps from authoritative source; or use version vectors / CRDTs for advanced cases. **Idempotency for eventual consistency.** - Same operation may apply twice. - Receiver must handle. - Patterns: idempotency key, state-based. Without idempotency, retries during reconciliation cause issues. ## Reconciliation Periodic process: - Compare source vs replica. - Identify discrepancies. - Resolve. Healthy eventually-consistent systems have ongoing reconciliation; not assumed correct. ## Compensating transactions When operation fails partway: - Undo what was done. - Restore consistent state. - Saga pattern formalises this. Saga in distributed transactions; covered in saga pattern guide. **User experience implications.** - **"Submit and see result later"** — UX makes lag acceptable. - **Optimistic UI** — show as if successful; reconcile if not. - **Status indicators** — "Processing"; clear feedback. UX design accommodates eventual consistency. **Read-your-own-writes.** - After user updates, they see updated value. - Crucial for user trust. - Achievable with eventual consistency through routing (read from same replica) or pin-to-source. Often the minimum acceptable consistency. **Patterns to mitigate eventual consistency UX problems.** - **Refresh after action** — re-fetch post-write. - **Local state** — keep client's view consistent. - **Wait and verify** — for critical operations. - **Acknowledge before consistent** — but communicate clearly. **Dynamics 365 specifics.** - **Dataverse to Dataverse cross-environment** — eventual. - **Dataverse to F&O via dual-write** — near-real-time. - **Dataverse to Synapse/Fabric** — eventual (minutes). - **Dataverse to external via API** — depends on integration. Each integration has its consistency characteristic; document and respect. **Testing eventually consistent systems.** - **Race condition tests** — concurrent updates. - **Lag tests** — verify within tolerance. - **Reconciliation tests** — discrepancies caught. - **Failure mode tests** — what happens if convergence fails. Specialised testing for distributed correctness. **Monitoring.** - **Replication lag** — current delay. - **Reconciliation discrepancies.** - **Convergence success rate.** Alert when lag exceeds threshold or discrepancies persist. **Common pitfalls.** - **Assuming strong consistency.** Code breaks under eventual. - **No reconciliation.** Drift accumulates. - **No conflict resolution policy.** Ad-hoc resolution; data corruption. - **UX assumes immediate visibility.** User confused. - **No monitoring of lag.** Issues invisible until significant. **Design principles.** - **Embrace asynchrony.** Don't fight it. - **Idempotent operations.** - **Clear conflict policy.** - **Periodic reconciliation.** - **User-visible status.** - **Monitor convergence.** ## Trade-off conversation Stakeholders need to understand: - Strong consistency → more cost, less scale. - Eventual → cheaper, scalable, but lag. Make the trade-off explicit; surprise eventual is bad UX. ## Strategic positioning Eventually consistent systems are the default for modern distributed architectures. Understanding when this is appropriate — and when it isn't — is core architectural skill. For architects: - Identify consistency requirements per use case. - Design for the right model. - Build conflict resolution, idempotency, reconciliation. - UX accommodates lag. - Monitor convergence. The discipline produces robust, scalable integrations that handle real-world distributed-system challenges. The alternative — assuming strong consistency everywhere — produces architectures that don't scale and code that breaks under load. Choose eventual consistency consciously where appropriate; design for it accordingly. --- # FetchXML vs OData in Dataverse Two query languages for Dataverse — what each does, performance and capability differences, and when to choose which. Source: https://www.solvingdynamics365.com/guides/fetchxml-vs-odata-in-dataverse Section: Integrations / API & identity Published: 2026-05-01 Dataverse exposes its data through two distinct query languages: **FetchXML** (the older, Dataverse-native XML format) and **OData** (the standard REST-style query syntax used by most modern API consumers). Both can return the same underlying data; choosing the right one depends on the use case. **FetchXML.** FetchXML is Microsoft's XML-based query language for Dataverse. Used by: - **Advanced Find** in the Dynamics 365 UI — what users see when building filtered views. - **Views** stored in Dataverse — view definitions are FetchXML under the hood. - **Plug-ins** doing complex queries via the SDK. - **Power Automate Dataverse "List rows" action** can use FetchXML for advanced filtering. - **SSRS reports** historically (now Power BI replaces SSRS). **Strengths:** - **Complex queries** — group-by, aggregate, hierarchical filtering with nested unions, complex join logic. More expressive than OData for analytical queries. - **Native to Dataverse** — uses Dataverse-specific concepts like Link-Entity, Filter expressions, Order-By. - **Aggregations** — count, sum, avg, min, max within a single query. - **Distinct** — explicit DISTINCT support. **Weaknesses:** - **Verbose XML** — substantial markup for non-trivial queries. - **Dataverse-specific** — doesn't translate to other systems. - **Documentation** outside Microsoft's official sites is sparser. - **Limited 5000-record default page** — extends with paging. **OData (Web API).** OData is the standard REST query syntax exposed by Dataverse's **Web API** (the `/api/data/v9.x/` endpoint). Used by: - **Modern integrations** — anything calling Dataverse from external systems. - **Power Automate flows** — most common pattern. - **Custom JavaScript** on forms (`Xrm.WebApi`). - **Power BI direct query** to Dataverse. - **Mobile apps** and SDKs. **Strengths:** - **Standard syntax** — `$filter`, `$select`, `$expand`, `$orderby`, `$top`, `$skip` are familiar to anyone with OData experience. - **Concise** — URL-encoded query parameters; no XML. - **HTTP-native** — works directly from REST clients, browsers, Postman. - **Documented broadly** — OData standard documentation plus Dataverse-specific extensions. - **Modern toolchain** — most SDKs and HTTP libraries support it natively. **Weaknesses:** - **Less expressive for complex analytics** — aggregations supported but more limited than FetchXML. - **Some Dataverse-specific operations** are awkward in OData (e.g. complex link-entity joins). - **Filter expression syntax** — quite expressive but doesn't support every FetchXML pattern. **Choosing.** Use **FetchXML** when: - You're working with advanced-find or views (the platform uses FetchXML there). - The query is highly analytical — group-by, aggregates, complex joins. - You're inside a plug-in or other Dataverse SDK context. Use **OData** when: - Calling Dataverse from an external system. - Writing a Power Automate flow's "List rows" action with simple filtering. - Writing JavaScript on a form to fetch related records. - Building a Power BI direct-query dataset. - Anything modern and HTTP-driven. ## Conversion The Dataverse SDK can convert FetchXML to OData and vice versa for many patterns, but not all. Some advanced FetchXML patterns don't translate to OData; some OData patterns don't translate efficiently to FetchXML. ## Performance For equivalent queries, FetchXML and OData both compile to the same underlying SQL. Performance differences are typically negligible. Both honour Dataverse's indexes and security filters identically. ## The Dataverse Query Designer Several community tools (XrmToolBox plug-ins, "FetchXML Builder", "OData Query Designer") let you build queries visually and emit either format. Useful when you know the data but aren't fluent in either syntax. ## Mixing approaches in one solution A non-trivial integration might use both: - The flow's main filter is OData (simpler, in Power Automate's Dataverse action). - A complex secondary query uses FetchXML (passed to "List rows" with a *Fetch XML Query* parameter). Both can be used side by side without conflict. **Common pitfalls.** - **Hand-writing complex FetchXML without the tools** — error-prone XML. - **OData $expand without $select** — fetches all expanded fields, blowing up payload size. - **Filtering on calculated columns** — neither query language indexes calculated columns efficiently. Use rollup or stored values. - **No paging on bulk queries** — OData and FetchXML both default to 5000-record pages; explicit paging is required for larger sets. ## Operational reality Most modern Dataverse integration work uses OData. FetchXML remains relevant for analytical work, view-based queries, and SDK-level customisation. Pick deliberately per use case; don't fight the tool. ### Frequently asked questions **When should I use FetchXML instead of OData?** For analytical queries with group-by, aggregates, distinct, and complex link-entity joins, inside plug-ins or SDK code, and wherever the platform already uses it — views and Advanced Find are FetchXML underneath. **Which is faster, FetchXML or OData?** Neither in practice. Both compile to the same underlying SQL, honour the same indexes and security filters, and perform equivalently for equivalent queries. **Can I use FetchXML in Power Automate?** Yes. The Dataverse List rows action accepts a Fetch XML Query parameter for advanced filtering, and it can sit alongside OData filters in the same flow. **What are the common query mistakes?** Using $expand without $select and pulling every related column, filtering on calculated columns that neither language indexes well, hand-writing complex FetchXML without a builder tool, and forgetting that both default to 5,000-row pages. --- # GraphQL and Dynamics 365 How GraphQL fits with Dynamics 365 — wrapping OData as GraphQL, third-party tooling, where GraphQL helps vs hurts, and the operational considerations. Source: https://www.solvingdynamics365.com/guides/graphql-and-dynamics-365 Section: Integrations / API & identity Published: 2026-05-01 Dynamics 365 exposes data primarily through OData REST APIs. GraphQL has become popular in the broader API world for its query flexibility and developer ergonomics — letting clients request exactly what they need in one round-trip. There's no native GraphQL endpoint for Dynamics 365, but the gap is filled by community tools, custom wrappers, and emerging Microsoft signals. Understanding the trade-offs helps developers decide whether to invest. **The OData vs GraphQL difference.** - **OData** — REST-based, query string expressed via `$select`, `$expand`, `$filter`. Server defines resource structure; client requests subsets. - **GraphQL** — Query language, request specifies exactly which fields and which related data. One query, one response. OData has rich query semantics; GraphQL has flexible response shaping. Both serve similar needs differently. **Why teams want GraphQL on Dynamics 365.** - **Single-call queries** — fetch customer + their open orders + their contact details in one request instead of multiple OData calls. - **Frontend developer experience** — front-end teams familiar with GraphQL prefer it. - **Reduced over-fetching** — request only the fields needed. - **Tooling** — Apollo Client, Relay, Hasura, etc., provide development conveniences. ## Why native GraphQL doesn't exist (yet) Microsoft has chosen OData as the canonical surface. Reasons: - Existing investment. - OData's query expressiveness covers most needs. - Standardisation work in OASIS. GraphQL support is being discussed but as of 2026 isn't native. ## Wrapping OData as GraphQL Common patterns: - **Custom GraphQL server** — Node.js, .NET, or Python service implementing GraphQL endpoints that translate to OData calls underneath. - **Hasura, Apollo Federation** — multi-source GraphQL with Dataverse as one source. - **Azure API Management policies** — transform GraphQL to OData server-side. - **Schema-first generation** — generate GraphQL schema from Dataverse metadata. Each adds an integration layer; each has its own maintenance burden. ## Schema generation Generating a GraphQL schema from Dataverse: - Tables become object types. - Columns become fields. - Relationships become edges. - Choice columns become enums. Tools (community-built) automate this. The generated schema is large for a typical Dynamics 365 environment; consider pruning to relevant entities. ## Authentication GraphQL endpoint authentication options: - **Pass-through** — caller's OAuth token forwarded to Dataverse; Dataverse enforces its own auth. - **Service principal** — wrapper authenticates as service principal; user identity carried separately. Pass-through is cleaner — Dataverse's security model applies directly. **Performance considerations.** - **N+1 query problem** — GraphQL response with many related items can fan out to many OData calls. DataLoader pattern batches. - **Caching** — GraphQL responses harder to cache than REST. - **Query complexity limits** — protect against malicious or accidental expensive queries. A GraphQL wrapper can be slower than well-designed OData calls. The win is developer ergonomics, not raw performance. ## Mutations Mutating Dataverse via GraphQL: - **Create / Update / Delete** map to OData equivalents. - Validation flows through Dataverse's plug-in and business rules. - Transactional semantics depend on wrapper implementation. For complex multi-record mutations, multiple OData calls behind the GraphQL mutation; failure handling more complex. ## Subscriptions GraphQL subscriptions for real-time updates: - WebSocket-based. - Map to Dataverse change notifications (webhooks, Service Bus). - Requires server-side state management. Not many production Dynamics 365 + GraphQL deployments leverage subscriptions; complexity high. **When GraphQL on Dynamics 365 makes sense.** - **Front-end team strongly prefers GraphQL** for developer productivity. - **Multiple data sources** (Dataverse + other systems) federated. - **Mobile or low-bandwidth clients** benefiting from precise field selection. - **Sufficient engineering capacity** to maintain a wrapper. **When it doesn't make sense.** - **Simple use cases** — Power Apps or Power Pages with direct Dataverse access. - **Performance-critical paths** — direct OData is faster. - **Small teams** — wrapper maintenance is unjustified overhead. - **No GraphQL expertise** — adopting GraphQL primarily for fashion sake adds risk. **Operational considerations.** - **Wrapper service** — needs deployment, monitoring, scaling. - **Schema versioning** — schema changes can break clients; manage carefully. - **Documentation** — schema is the contract; keep it documented. - **Error handling** — GraphQL errors differ from REST status codes. ## Microsoft's direction Microsoft has gradually warmed to GraphQL across products. Dataverse may eventually offer native GraphQL; tracking the roadmap is wise. Until then, customer-managed wrappers fill the gap. **Common pitfalls.** - **Over-fetching despite GraphQL.** Lazy schema design pulls all fields; doesn't reduce data. - **No query depth limits.** Malicious query traverses deep relationships; performance dies. - **Schema gets out of sync.** Schema generated once, Dataverse evolves, schema stale. - **Authentication confusion.** Multiple identity layers; debugging hard. - **Resilience missing.** GraphQL endpoint becomes a bottleneck without retry / circuit-breaker patterns. ## Strategic positioning GraphQL on Dynamics 365 is a deliberate engineering choice, not a default. For teams with strong front-end GraphQL preference and capacity to maintain the wrapper, it can improve developer experience. For most Dynamics 365 implementations, OData is sufficient — the engineering effort to add GraphQL doesn't pay back. As Microsoft's API strategy evolves and native GraphQL potentially emerges, the calculus may shift; until then, choose carefully and only when there's clear value. --- # Idempotency in Dynamics 365 integrations Why integrations must be idempotent — patterns for safe retries, deduplication, correlation IDs. Source: https://www.solvingdynamics365.com/guides/idempotency-in-dynamics-365-integrations Section: Integrations / Architecture patterns Published: 2026-08-05 ### Key facts - Dataverse's Upsert operation with an alternate key is the canonical idempotent pattern — calling it repeatedly with the same data updates the existing record or creates it once, regardless of how many times the request is repeated. - Check-before-create has a race condition: two simultaneous executions can both find the record missing and both insert it, so it is acceptable only at low volume, not for high-volume or mission-critical flows. - Azure Service Bus supports message deduplication natively — messages sharing the same MessageId within a deduplication window are treated as duplicates and discarded automatically. - ETag-based optimistic concurrency is complementary to idempotency but distinct from it: submitting an update with If-Match against a stale ETag fails the write instead of silently overwriting a change made in between. - Synchronous plug-ins inherit transactional idempotency, since a failed transaction rolls back the plug-in's effects too, but asynchronous plug-ins may retry and must be designed as idempotent or accept duplicates. In any distributed system, messages can be delivered more than once. A network timeout, a webhook retry, a Service Bus redelivery — all produce the same business event arriving twice. An integration that's not **idempotent** processes the message twice, creating duplicate records, double-charging customers, or sending repeated notifications. Designing for idempotency from the start is fundamental. **The problem.** A naive integration: 1. External system sends "Customer X placed Order Y" event. 2. Network glitch; the publisher retries. 3. The consumer receives the event twice. 4. The consumer creates Order Y twice in Dataverse. 5. Customer X has two orders for one purchase; chaos. **Idempotency means: running the same operation twice produces the same result as running it once.** **Patterns for idempotent operations.** **1. Check before create.** Before inserting a record, query for it: ``` Does Order Y exist? Yes → already processed; do nothing. No → create Order Y. ``` This works but has a race condition: two simultaneous executions could both find "doesn't exist" and both insert. Acceptable for low-volume scenarios with reasonable network conditions; insufficient for high-volume / mission-critical. **2. Upsert with alternate key.** Use Dataverse's **Upsert** operation with an alternate key: ``` PATCH /api/data/v9.2/salesorders(ordernumber='Y') { ...order data... } ``` If the order exists, it's updated; if not, it's created. The platform handles the atomicity. Idempotent by design. **3. Correlation ID.** Each external event carries a unique identifier (the event's ID, a UUID, a deduplication token). The consumer: 1. Receives the event with correlation ID `evt-123`. 2. Checks "have I processed event `evt-123` before?" against a tracking store (Dataverse table, Azure Cache, or message header). 3. If yes, skip. 4. If no, process and record `evt-123` as processed. This handles cases where the business operation isn't naturally identifiable by a stable business key. **4. Idempotency tokens.** Some patterns send an explicit idempotency token in the request header. The consumer treats requests with the same token as duplicates of each other. **5. Natural keys.** Many business entities have natural keys — order number, invoice number, transaction reference. If the publisher uses these consistently and the consumer matches by them, duplicates are detected naturally. **Dataverse-specific patterns.** ## Upsert As mentioned, Dataverse's Upsert is the canonical pattern: ``` PATCH /api/data/v9.2/salesorders(ordernumber='ORD-2026-001') Headers: If-Match: * { "orderdate": "2026-01-15", "customerid_account@odata.bind": "/accounts()", ... } ``` With an alternate key on `ordernumber`, the operation is idempotent regardless of how many times it's called with the same data. ## ETag-based concurrency Beyond idempotency, ETag-based optimistic concurrency prevents lost updates: - Read the record; get its ETag. - Submit the update with `If-Match: `. - If the record changed between read and write, the update fails; consumer re-reads and retries. Different from idempotency but complementary. ## Service Bus deduplication Azure Service Bus supports **message deduplication** — messages with the same `MessageId` within a deduplication window are treated as duplicates and discarded automatically. Set the `MessageId` to the business event's correlation ID; Service Bus handles the deduplication infrastructure. ## Webhooks Dataverse webhooks include a `Cloud Event ID` header — a unique ID per event firing. Consumers track which IDs have been processed; duplicates are detected. **Power Automate flows.** - **Native trigger deduplication** isn't always supported; check per trigger. - **Explicit deduplication step** — use a Dataverse table to track processed correlation IDs; the flow checks before processing. - **Idempotent action choice** — prefer Upsert over Create when possible. **Plug-ins.** Synchronous plug-ins running in the originating transaction inherit transactional idempotency — if the transaction fails, all effects roll back, including the plug-in's. Asynchronous plug-ins may retry; design them as idempotent or accept duplicates. ## Compensation actions When idempotency isn't possible (e.g. notification sending, payment processing), use **compensation**: - Track every action with status. - On detection of duplicate processing, compensate (reverse the duplicate effect). Compensation is complex; design carefully. **Why this matters.** - **Distributed systems aren't reliable** — messages duplicate. Idempotency is the only sane design pattern. - **Retries are inevitable** — clients retry on timeouts; queues redeliver; webhooks retry. - **Without idempotency**, every retry is a bug waiting to happen. **Common pitfalls.** - **Assuming "won't happen"** — duplicates happen far more often than developers expect. - **No correlation ID** — can't detect duplicates after the fact. - **Check-before-create with race conditions** — works at low volume; fails at scale. - **Side effects without idempotency consideration** — duplicate notifications, double-charges, repeated webhooks downstream. ## Operational reality Design every Dynamics 365 integration as idempotent. The investment is small; the cost of not doing it is dramatic when problems occur. Use Upsert, use correlation IDs, use natural keys; track processed events; expect retries. ## Where to go next The Dataverse mechanism that makes upserts safe is [alternate keys](https://www.solvingdynamics365.com/guides/dataverse-alternate-keys); the retry side is [retry policies with Azure services](https://www.solvingdynamics365.com/guides/retry-policies-with-azure-services) and [message replay and poison queues](https://www.solvingdynamics365.com/guides/message-replay-and-poison-queue-handling-for-d365); the publish side is [the outbox pattern](https://www.solvingdynamics365.com/guides/the-outbox-pattern-with-service-bus). On Business Central, the duplicate and concurrency errors an idempotent client must handle are in [Business Central API errors](https://www.solvingdynamics365.com/guides/business-central-api-errors). Verifying all of this actually holds under retries and failures is what [integration testing patterns](https://www.solvingdynamics365.com/guides/integration-testing-patterns-for-dynamics-365) covers, and seeing it happen in production — including via [OpenTelemetry](https://www.solvingdynamics365.com/guides/opentelemetry-with-dynamics-365) — is [observability for Dynamics 365 integrations](https://www.solvingdynamics365.com/guides/observability-for-dynamics-365-integrations). --- # Integrating Business Central with Microsoft 365 How Business Central plugs into Outlook, Teams, Excel, SharePoint, OneDrive, and the rest of Microsoft 365. Source: https://www.solvingdynamics365.com/guides/integrating-business-central-with-microsoft-365 Section: Integrations / Data movement Published: 2026-05-01 One of Business Central's enduring strengths is how naturally it lives inside Microsoft 365. The integrations are first-party, mature, and configured rather than coded. ## Outlook The **Business Central Outlook add-in** opens a side pane from any email. The system recognises the email's sender as a BC customer, vendor, or contact and surfaces their record inline. From the pane the user can: review open documents, create a new quote or invoice for the contact, look up product availability, and even post a payment — all without leaving Outlook. Calendar appointments can sync as activities. The Outlook integration is the single feature SMB sales and AR users adopt most readily. ## Teams A **Business Central app for Teams** lets users: - Share a customer, vendor, or item card into a chat or channel as a rich card. - Click through from the card to the record in BC. - Run a quick lookup from the Teams compose box. - Receive approval requests as adaptive cards that approve directly in Teams. For organisations that operate substantially in Teams, this collapses the friction of "switch to ERP, find the record, take action". ## Excel Almost every list page in BC offers **Edit in Excel** — opens the list in Excel as a live, two-way connected workbook. Sort, filter, edit, save — changes post back to BC. Used heavily for bulk price updates, mass item edits, dimension changes, and journal preparation. The single feature Finance teams love most. ## Power BI Pre-built Power BI apps for finance, sales, purchasing, and inventory consume BC data via the API. Embed Power BI reports inside BC role centres for inline dashboards. ## SharePoint and OneDrive Document attachments on BC records are stored in **OneDrive for Business** or a configured SharePoint site, not in the BC database. Keeps the database lean and gives users normal Office collaboration on attached files. Configure a **SharePoint storage location** for shared documents (versioning, permissions, search). ## Microsoft Search A BC connector for Microsoft Search lets users find BC customers, vendors, and items from the M365 search box in any Office app. ## Word Posted invoice, quote, and statement document layouts can be customised in **Word** by editing a layout template. Power users with no AL skills design document layouts directly. ## To-Do and Planner Through Power Automate, BC activities can sync to To-Do for personal tasks or Planner for shared work boards. ## Copilot Microsoft 365 Copilot increasingly has cross-product awareness — drafting an email in Outlook can reference open BC documents, and Word-generated proposals can pull from BC pricing. ## Setup Most integrations are tenant-wide, enabled with a few clicks in BC's *Set up your business with Microsoft 365* assisted setup. --- # Integrating Business Central with Salesforce Patterns for connecting Business Central to Salesforce — accounts and contacts, opportunities to orders, and the choice between iPaaS and direct integration. Source: https://www.solvingdynamics365.com/guides/integrating-business-central-with-salesforce Section: Integrations / Data movement Published: 2026-05-01 Plenty of mid-market companies run **Salesforce** for CRM and **Business Central** for ERP, and need them to talk. Microsoft doesn't ship a first-party connector for this pair (it ships one for Dynamics 365 Sales, naturally), so the integration is built — by partner, ISV, or in-house — using one of three patterns. ## Pattern 1: iPaaS middleware The most common approach. A platform like **MuleSoft, Boomi, Azure Logic Apps, Tray.io, Workato,** or **Power Automate** sits between the two systems and synchronises records. The middleware handles transformation, retry, error handling, and observability. iPaaS scales well, supports complex mappings, and is what Salesforce customers typically already have for other integrations. ## Pattern 2: ISV connector from AppSource or AppExchange Several ISVs publish packaged Business Central ↔ Salesforce connectors — typically pre-built mappings for Accounts/Contacts/Opportunities/Orders with a configuration UI. Faster to deploy than custom iPaaS, more rigid in shape. Suitable for standard integrations where the entity model matches both products without too much customisation. ## Pattern 3: Direct API-to-API Code that calls Salesforce's REST API and Business Central's v2.0 API directly, hosted in an Azure Function or similar. Cheapest to start, hardest to maintain — every change in either system risks breaking the integration. Reasonable only for the simplest, most-stable integrations. **The canonical mapping.** - **Salesforce Account** ↔ **BC Customer / Vendor**, matched on Tax ID or a custom external-ID field. - **Salesforce Contact** ↔ **BC Contact**. - **Salesforce Opportunity (Closed Won)** → **BC Sales Quote or Sales Order**. Won opportunities push into BC; BC posts the invoice and pushes back the invoice number and status. - **BC Invoice / Payment** → **Salesforce custom Invoice and Payment records**, so sales reps see paid status. ## Identity and ownership Decide which system is the **source of truth** for each entity. Typically Salesforce owns leads/opportunities, BC owns inventory/finance, and customers are owned by Salesforce up to opportunity-closed-won, then BC takes over for the customer record's financial side. ## Pricing and product catalog Items live in BC; published to Salesforce via the connector as **Products**. Salesforce Price Books map to BC price lists. Keep the catalog one-way (BC → SF) to avoid sync conflicts on something as critical as pricing. ## Inventory Real-time inventory in Salesforce is rare and expensive. The pragmatic pattern: show last-known stock with a refresh timestamp; reserve inventory only at order-creation time in BC. ## Operational reality Two production systems with continuous sync is more demanding than either alone. Allow budget for ongoing maintenance, monitoring, and quarterly reconciliation. Build the integration tests before you build the integration. --- # Integrating Business Central with Shopify How Microsoft's Shopify connector for Business Central works — items, orders, inventory sync, fulfilment, and the operational realities. Source: https://www.solvingdynamics365.com/guides/integrating-business-central-with-shopify Section: Integrations / Data movement Published: 2026-05-01 Microsoft ships a **first-party Shopify connector** as part of Business Central. For B2C and small-B2B sellers running Shopify as their storefront and Business Central as their back office, it's typically the integration of first choice. ## What the connector does The connector synchronises five things between Business Central and one or more Shopify shops: 1. **Items / products.** Items in BC publish to Shopify as products with title, description, images, tags, variants, prices, and inventory. The push is one-way (BC → Shopify) for catalogue control. 2. **Inventory.** On-hand quantities at nominated BC locations sync to Shopify so the storefront shows accurate stock. Multi-location stock can publish to Shopify's multi-location. 3. **Orders.** Shopify orders import into BC as sales orders, with the Shopify customer mapped to a BC customer (auto-created or matched). Order line items reference the originating BC items. 4. **Fulfilments.** When a BC sales shipment posts, the connector pushes a fulfilment back to Shopify, including tracking number, marking the order as shipped for the customer. 5. **Payments.** Shopify's payment summary imports into BC as a customer payment, applied against the imported sales invoice when the order is also fulfilled and invoiced. ## Customer mapping A Shopify customer maps to a BC customer either by email match or by auto-creation in a template-defined customer template. Repeat customers reuse their BC record. ## Tax handling Shopify computes tax client-side; the connector imports the order with tax pre-calculated. For VAT-registered EU businesses on OSS or import-VAT regimes, configure carefully — mismatches between Shopify's tax engine and BC's VAT engine surface here. ## Inventory timing Inventory sync is **near-real-time but not transactional**. A Shopify oversell — two customers buy the last unit in the same minute — can happen during reconciliation gaps. Configure Shopify's safety-stock buffer to absorb the window. ## Multi-shop The connector supports multiple Shopify shops mapped to the same or different BC companies. Useful for multi-region operations. ## Limits The first-party connector handles standard order-to-cash. For sophisticated needs — subscriptions, complex bundles, B2B pricing tiers, Shopify Plus features like wholesale channels — ISV connectors from AppSource often add the missing scope. ## Set-up Connecting a shop is wizard-driven: install the Shopify Sales Channel app from BC's AppSource entry, supply the Shopify store URL and access token, map BC items to publish, configure customer template and posting groups, and run an initial sync. ## Operational reality Daily reconciliation checks (orders not imported, payments not matched, fulfilments not pushed) are essential in the first weeks. Once stable, the integration runs unattended. --- # Integrating Copilot Studio agents with external APIs How Copilot Studio agents call systems outside Microsoft — REST actions from OpenAPI, custom connectors, Power Automate flows, and MCP servers. Source: https://www.solvingdynamics365.com/guides/integrating-copilot-studio-agents-with-external-apis Section: Integrations / API & identity Published: 2026-09-02 A Copilot Studio agent that can only read a knowledge base is a search box with better manners. The agents that earn their place are the ones that do things: check an order status in a logistics system, raise a ticket in an external help desk, look up a price in a pricing engine, book an appointment. All of those live behind APIs that are not Microsoft's. Copilot Studio has accumulated four ways to reach them, and they are not interchangeable. ## The four routes **REST API actions from an OpenAPI specification.** You upload or point to an OpenAPI (Swagger) document, pick the operations to expose, describe each in plain language, and the agent can call them directly. The orchestrator decides when to invoke an operation based on the description and the user's request, fills the parameters from conversation context, and works the response into its reply. This is the most direct route and the one to try first for any API that has a decent OpenAPI file. **Custom connectors.** The same Power Platform custom connector you would build for Power Automate or canvas apps, surfaced to the agent as an action. Worth it when the connector already exists, when you want the API reused across flows and apps, or when the API needs authentication types the REST action route does not handle well. See [custom connectors in Power Platform](https://www.solvingdynamics365.com/guides/custom-connectors-in-power-platform). **Power Automate flows as actions.** The agent calls a flow, the flow does whatever it likes, including multi-step logic, and returns outputs. This is the route for anything that is not a single API call: check two systems and combine, apply business rules, write an audit record. It adds latency and a flow run per invocation, and the flow becomes the thing you debug. **MCP servers.** Model Context Protocol is the open standard for exposing tools to AI agents. Copilot Studio can connect to an MCP server and pick up all the tools it advertises at once, with their descriptions and schemas, instead of you defining each action by hand. If your organisation or a vendor already publishes an MCP server, this is the least work and the most likely to keep up with API changes. It is newer than the other routes, and the tooling around authentication and governance is still settling. ## Choosing between them Start with the question "is this one API call or a process?" One call: REST action or MCP tool. A process: Power Automate flow. Then ask "does this API already have a connector or an MCP server?" If yes, use it rather than describing the same endpoints again. Custom connectors are the middle option that many teams skip straight past, and that is often correct. Their advantage is reuse; if the agent is the only consumer, the extra artefact is not worth maintaining. ## Descriptions are the interface The agent's orchestrator decides which action to call based on the natural-language descriptions you give each action and parameter. A vague description ("gets data") leads to the wrong action being called or never being called. A precise one ("returns the shipping status and expected delivery date for a sales order given its order number") gets used correctly. Spend real time on these, test with the phrasings users actually use, and treat description changes as releases. Parameter descriptions matter just as much. If a parameter is an order number in a particular format, say so; the agent will otherwise pass whatever the user typed. ## Authentication This is where external API integration gets serious. The options are none, API key, OAuth 2.0 with a shared application identity, and OAuth 2.0 with per-user identity. For internal APIs behind Entra ID, per-user authentication is the right default because the external system then applies its own authorisation to the actual user rather than to a service account with broad rights. For third-party SaaS APIs with an API key, store the key in the connection, never in a topic variable, and rotate it like any other secret. See [Dataverse secrets and Key Vault](https://www.solvingdynamics365.com/guides/dataverse-secrets-and-key-vault-integration) for where secrets should live. Agents published to Teams and Microsoft 365 Copilot use the signed-in user's identity, which makes per-user auth straightforward. Agents published to a public website need to authenticate the user first before per-user auth means anything. ## Error handling and fallbacks External APIs fail, time out, and return shapes the agent does not expect. Configure what the agent says when an action fails, and make it honest ("I could not reach the order system just now") rather than inventive. For flow-backed actions, handle errors inside the flow and return a clean status rather than letting the run fail. For anything financial or irreversible, put a confirmation step in a topic before the action executes; the orchestrator should not book, pay, or delete on its own inference. ## Governance Every route passes through Power Platform DLP policies. A connector or an HTTP endpoint blocked by DLP will fail at design time or run time depending on the route, and the error is not always obvious. Agree the allowed endpoints with the platform team before the agent is built. Managed environments add agent-level controls; see [DLP policies in Power Platform](https://www.solvingdynamics365.com/guides/dlp-policies-in-power-platform). ## What breaks in practice OpenAPI files that are technically valid and semantically useless, with operation names like "post_v2_items" and no descriptions. Agents that call an action too eagerly because the description was broad. Flows that time out because the external API is slow and nobody set a sensible timeout. Secrets in variables. ## Stability verdict REST actions, custom connectors, and flow actions are established and stable. MCP support is real and moving fast, which is both its appeal and its risk. For how an agent should be scoped and tested before any of this, read [building agents with Copilot Studio](https://www.solvingdynamics365.com/guides/building-agents-with-copilot-studio). --- # Integrating Copilot Studio with MCP servers How Model Context Protocol servers plug into Copilot Studio agents, what they change compared with hand-built actions. Source: https://www.solvingdynamics365.com/guides/integrating-copilot-studio-with-mcp-servers Section: Integrations / API & identity Published: 2026-09-02 Model Context Protocol is an open standard for describing tools an AI agent can call. A server publishes a list of tools with names, descriptions, and input schemas; an agent connects, reads the list, and invokes tools as the conversation requires. Copilot Studio supports connecting agents to MCP servers, which means that instead of describing each API operation to the agent by hand, you point it at a server and inherit everything the server offers. For Dynamics 365 consultants this matters because it changes how integrations reach agents, and because Microsoft and third parties are publishing MCP servers for the systems you already integrate with. ## What changes compared with actions The route described in [Copilot Studio agents with external APIs](https://www.solvingdynamics365.com/guides/integrating-copilot-studio-agents-with-external-apis) has you defining actions one at a time: an OpenAPI operation or a flow, each with a description you write. With MCP, the server owns the tool definitions. When the server adds a tool or improves a description, every connected agent sees it without a change in Copilot Studio. Tools also carry richer semantics than a REST operation: a server can expose resources (documents or records the agent can read) and prompts (canned instructions) alongside tools. Practically, an MCP connection in Copilot Studio appears as a set of actions the orchestrator can choose from, subject to the same DLP and connection governance as any other action. The agent does not become smarter; it becomes better informed about what it can do. ## Where MCP servers come from **Microsoft's own.** Dataverse has an MCP server that exposes its tables and operations, and further first-party servers for Dynamics 365 workloads are appearing. For an agent that needs to read and write Dataverse records, the Dataverse MCP server is the most direct route, with tool definitions maintained by the platform. **Vendors.** SaaS vendors are shipping MCP servers as a standard part of their developer offering. If the agent needs to talk to a help desk, a document store, or a data platform that publishes one, use it rather than describing the same API again. **Your own.** A server you build, typically as an Azure Function or a container app, exposing your organisation's specific operations: "look up a customer's open orders across Business Central and Dataverse", "check stock at the nearest warehouse". This is where MCP earns its keep, because the tool can encapsulate the cross-system logic and the agent sees one clean operation. ## Building a server for Dynamics 365 data Write tools around business operations, not tables. A tool called "get customer summary" that returns account, open cases, open invoices, and last order, drawing on Dataverse and Business Central behind the scenes, is far more useful to an agent than four tools that each return raw rows. The agent will otherwise chain calls, make mistakes in the joins, and produce slow conversations. Keep the tool count small and the descriptions precise. An agent choosing among fifty tools with overlapping descriptions picks the wrong one; an agent with eight well-named tools does not. Make tools read-only unless a write is genuinely required, and put any write behind a parameter that makes the intent explicit, so a confirmation step in the agent's topic can gate it. Host it where the organisation already runs APIs. Put [API Management in front](https://www.solvingdynamics365.com/guides/apim-in-front-of-dataverse) if there are other consumers, and log every call with the user identity and the tool name, because agent behaviour is otherwise hard to audit. ## Authentication An MCP server is an HTTP endpoint and the connection to it is a Power Platform connection, so the standard options apply: no authentication for a public server (rare and usually wrong), an API key, or OAuth 2.0. For a server touching Dynamics 365 data, use OAuth with Entra ID and pass the user's identity through, so the server queries Dataverse or Business Central as the user and the platform's own security applies. A server running as a broad service principal hands every agent user that principal's rights, which is the same mistake as an over-privileged integration user in any other context. ## Governance DLP policies control which MCP connectors an environment may use, and a server not on the allow list will fail to connect. Agree the list with the platform team. Treat a third-party MCP server as a third-party integration: review what its tools do, what data leaves the tenant in each call, and how the vendor handles it. A tool description is a promise, not a contract; test what the tool actually returns. Version the server. An agent built against tool version one that starts receiving version two's changed schema will behave oddly with no error in Copilot Studio. Keep old tool names stable and add new ones rather than changing existing signatures. ## What breaks in practice Servers that expose every table as a tool, so the agent drowns in options. Descriptions written for developers rather than for the model that reads them. Servers with no timeout, so a slow backend stalls the conversation. Connections created with a personal account that later leaves. Agents given write tools without a confirmation topic. ## Stability verdict MCP support in Copilot Studio is real and usable, and the protocol has broad industry backing, which is a good sign for longevity. It is also young: the authentication story, the governance tooling, and the set of first-party servers are all changing quickly, and something that works this quarter may need adjusting next. Build your own servers thin and expect to revisit them. For scoping the agent itself, read [building agents with Copilot Studio](https://www.solvingdynamics365.com/guides/building-agents-with-copilot-studio); for how Copilot Studio relates to the Copilot agents inside Dynamics 365 apps, see [Copilot agents vs Copilot Studio](https://www.solvingdynamics365.com/guides/copilot-agents-vs-copilot-studio). --- # Integrating Dataverse with Azure Cosmos DB When Dataverse is the wrong place for high-volume data, and how to pair it with Azure Cosmos DB — the offload pattern, virtual tables, event feeds. Source: https://www.solvingdynamics365.com/guides/integrating-dataverse-with-azure-cosmos-db Section: Integrations / Data movement Published: 2026-09-02 Dataverse is a relational, transactional, security-aware store for business records. It is not a place for telemetry, clickstreams, IoT readings, chat transcripts, or any table that grows by millions of rows a week. Organisations discover this when their storage bill spikes or when a model-driven app grinds because someone stored sensor pings as custom-table rows. Azure Cosmos DB is the usual answer for the high-volume tier, and the design question is how to pair the two so users still see what they need inside Dynamics 365. ## The dividing line A useful rule: if a record has an owner, a lifecycle, and a security boundary, it belongs in Dataverse. If it is an event, a reading, a log entry, or a document that is written once and read rarely, it belongs in Cosmos DB or similar. Cases, contacts, work orders, and opportunities stay in Dataverse. The ten thousand telemetry readings behind one IoT alert, the full transcript of every chatbot conversation, and the audit trail of an external portal go to Cosmos DB, with a summary or a reference in Dataverse. Getting this line wrong in the Dataverse direction costs money and performance. Getting it wrong in the Cosmos DB direction costs you the security model, the relationship model, and everything that makes Dataverse useful. ## Pattern 1: offload with a summary The high-volume data is written to Cosmos DB by whatever produces it (a device gateway, a portal, an Azure Function). Dataverse holds one summary record per logical thing, for example one IoT alert with the latest reading and a count, and that record carries a key into Cosmos DB. A model-driven form shows the summary; a button, a PCF control, or an embedded canvas app fetches the detail from Cosmos DB on demand through an API. This is the pattern to default to. Dataverse stays lean, users get detail when they ask for it, and the two stores have a clear contract. ## Pattern 2: virtual tables over Cosmos DB [Dataverse virtual tables](https://www.solvingdynamics365.com/guides/dataverse-virtual-tables) let external data appear as a Dataverse table without being stored there. There is no first-party Cosmos DB provider, so you build one: a custom virtual table provider in C#, or a custom connector with OData-style semantics behind the virtual connector provider. Users then see Cosmos DB documents in views and subgrids as if they were Dataverse rows. It works, and it is elegant when it does, but the constraints are real. Virtual tables need a stable primary key that maps to a GUID, they do not support all Dataverse features (no auditing, no rollups, limited security), and every view is a live query against Cosmos DB with the latency and request-unit cost that implies. A badly filtered view against a large container will be slow and expensive. Use this pattern for lookup-style access to moderate volumes, not as a way to scroll through a billion rows in a grid. ## Pattern 3: Dataverse as the event source The reverse direction: Dataverse changes need to land in Cosmos DB, typically to feed a customer-facing application that cannot query Dataverse directly at scale, or to build a read model for a high-traffic portal. Dataverse publishes changes through [Service Bus or Event Grid](https://www.solvingdynamics365.com/guides/azure-service-bus-integration-with-dataverse), an Azure Function consumes them and writes documents to Cosmos DB, and the portal reads Cosmos DB. This is the [CQRS pattern](https://www.solvingdynamics365.com/guides/cqrs-pattern-for-dynamics-365) with Cosmos DB as the read store, and it is the right shape when Dataverse's API limits would otherwise become the portal's bottleneck. Design the documents for the reads the portal makes, not as mirrors of Dataverse tables. Cosmos DB is best when each query hits one partition, which means denormalising aggressively and choosing partition keys around how the data is read, usually by customer or account. ## Consistency and identity Cosmos DB is eventually consistent by default across regions and tunable per request. Dataverse is strongly consistent within a transaction. Any pattern that moves data between them needs to accept a lag and design for it: show timestamps, avoid promising users that a write in one place is instantly visible in the other, and make writes idempotent so retries do not duplicate documents. See [idempotency in Dynamics 365 integrations](https://www.solvingdynamics365.com/guides/idempotency-in-dynamics-365-integrations). Use the Dataverse GUID as the document ID, or store it as a dedicated field, so the join between stores is unambiguous. Never rely on names or natural keys. ## Security The Dataverse security model stops at the Dataverse boundary. Anything reading Cosmos DB directly, whether a PCF control or a portal, needs its own authorisation, typically an Azure Function that checks the caller's identity and applies row filtering before returning documents. Do not hand Cosmos DB keys to a canvas app or a browser control. ## Cost Cosmos DB is priced by provisioned or serverless request units plus storage; Dataverse by capacity. Moving a chatty high-volume table out of Dataverse almost always reduces total cost. Moving a low-volume business table out of Dataverse almost always increases it, once you count the Azure Function, the monitoring, and the developer who understands both. ## What breaks in practice Partition key choices made early and regretted later; changing one means rewriting the container. Virtual table providers that were built for a demo and then asked to handle production filters. Portals that hit Cosmos DB cross-partition queries because the read model was designed as a copy of Dataverse rather than as a read model. ## Stability verdict The offload-with-summary pattern and the CQRS read-store pattern are both stable and well understood, and are what you should reach for. Virtual tables over Cosmos DB are viable but bespoke, and you own the provider for its lifetime. If the real driver is Dataverse storage cost rather than performance, read [Dataverse storage types explained](https://www.solvingdynamics365.com/guides/dataverse-storage-types-explained) first; sometimes the answer is cheaper than a second database. --- # Integrating Dataverse with Microsoft Fabric Link How Dataverse's Link to Microsoft Fabric works, how it differs from Synapse Link, what 'real-time' actually means. Source: https://www.solvingdynamics365.com/guides/integrating-dataverse-with-microsoft-fabric-link Section: Integrations / Data movement Published: 2026-09-02 Link to Microsoft Fabric is the feature that takes Dataverse tables, including the Dynamics 365 Sales, Customer Service, and Field Service tables that live in Dataverse, and makes them queryable in Fabric without exporting anything. It is the successor in spirit to Synapse Link, and for most organisations already on Fabric it is now the default route for Dynamics 365 CRM analytics. It is worth understanding precisely what it does, because "no copy" and "real time" are both true in a specific sense and misleading in a general one. ## What Link to Fabric actually does You link a Dataverse environment to a Fabric workspace from the Power Apps maker portal. Dataverse then maintains a Delta Lake representation of the selected tables in Dataverse-managed storage, and Fabric exposes that as a Lakehouse with shortcuts pointing at it. Analysts see tables in a Fabric Lakehouse; Power BI sees them through Direct Lake; the SQL analytics endpoint lets you query them with T-SQL. Nothing is copied into OneLake, and nothing needs an Azure subscription or a storage account of your own. The distinction from [Azure Synapse Link for Dataverse](https://www.solvingdynamics365.com/guides/azure-synapse-link-for-dataverse): Synapse Link writes to an ADLS Gen2 account you own and is the right choice when the destination is not Fabric, or when you need the files under your own control for other consumers. Link to Fabric keeps the data in Dataverse's storage and counts against Dataverse capacity. If Fabric is the warehouse, Link to Fabric is simpler. If Snowflake or Databricks is the warehouse, Synapse Link is the one you want. ## What "near real time" means here Changes in Dataverse appear in the Fabric Lakehouse after a refresh interval that is typically minutes, not seconds, and it varies with load and table size. That is close enough for operational dashboards that refresh every quarter of an hour. It is not close enough for anything that reacts to a single record change, and it is not an eventing mechanism. If you need to act on a record within seconds of it changing, that is a job for [webhooks or Dataverse events](https://www.solvingdynamics365.com/guides/webhooks-vs-events-in-dataverse), not for analytics. For genuinely streaming needs, Fabric's Real-Time Intelligence workload (Eventstreams and KQL databases) can ingest from Dataverse change events via Event Hubs or Service Bus, but you are then building an eventing pipeline, and Link to Fabric is not part of it. ## Patterns that work **Direct Lake reports on Dataverse tables.** The headline use case. Power BI semantic models over the linked Lakehouse tables, with no import refresh and no DirectQuery latency. Sales pipeline, case backlog, and work order dashboards land here. Keep the semantic model over a curated layer rather than the raw tables, because raw Dataverse tables carry option set integers, GUID lookups, and a hundred columns nobody wants. **Cross-system models.** Dataverse tables joined with Finance and Operations data (also linkable to Fabric) and with external sources landed in the same Lakehouse. This is where Fabric earns its place over a plain Power BI model: a customer 360 that spans CRM opportunities and ERP invoices without a custom integration. **Notebooks and data science.** Spark over the linked tables for churn scoring, lead scoring, or forecasting, with results written to a separate Lakehouse table and surfaced back into Dynamics 365 through a [virtual table](https://www.solvingdynamics365.com/guides/dataverse-virtual-tables) or a scheduled Dataverse write. Never write model outputs back into the linked tables; they are read-only from the Fabric side by design. **Historical retention.** Dataverse has no cheap way to keep years of closed cases or won opportunities queryable. A Fabric Lakehouse fed by Link to Fabric, with a periodic snapshot into a separate archive table, becomes the long-term store, and [bulk delete jobs](https://www.solvingdynamics365.com/guides/bulk-delete-jobs-in-dataverse) can then trim Dataverse. ## Capacity and cost Two meters run. Dataverse storage capacity grows because the Delta representation is stored on the Dataverse side. Fabric capacity units are consumed by whatever you run in Fabric: Direct Lake queries, Spark notebooks, SQL endpoint queries. Neither is dramatic for a mid-sized CRM, but both surprise organisations who assumed "no copy" meant "no cost". Check the [Dataverse storage types](https://www.solvingdynamics365.com/guides/dataverse-storage-types-explained) guide for how the Dataverse side is counted. ## Security Dataverse row-level and column-level security do not apply in Fabric. A user with access to the Lakehouse sees every row of every linked table. Fabric's own OneLake security and semantic model row-level security are where access control gets rebuilt. This is the single most common design gap: a CRM where sales territories carefully hide each other's opportunities, feeding a Fabric workspace where everyone sees everything. ## What breaks in practice Table selection creep. Someone links every table "to be safe" and Dataverse capacity climbs. Link what reports need. Schema changes. New columns appear automatically; deleted columns and renamed tables are handled less gracefully. Downstream notebooks that hard-code column lists break. Environment lifecycle. Restoring or copying a Dataverse environment does not carry the Fabric link. Rebuild it as part of your environment runbook. Expectation management around latency, as above. Label dashboards with their refresh time. ## Stability verdict Link to Fabric is generally available, actively invested in, and clearly Microsoft's preferred path, so it is a safe foundation. The moving parts are around it: Fabric's own workloads change quickly, and the capacity model is still being tuned. For the wider picture of where Fabric fits across Dynamics 365, including F&O and Business Central, read [Microsoft Fabric and Dynamics 365](https://www.solvingdynamics365.com/guides/microsoft-fabric-and-dynamics-365). --- # Integrating Dynamics 365 Sales with Salesforce How to run Dynamics 365 Sales alongside Salesforce during a migration or a long-term split — sync patterns, system-of-record rules, and what breaks in practice. Source: https://www.solvingdynamics365.com/guides/integrating-dynamics-365-sales-with-salesforce Section: Integrations / Third-party systems Published: 2026-09-02 Most organisations that connect Dynamics 365 Sales to Salesforce are not building a permanent integration. They are somewhere on a path from one CRM to the other, or they have inherited two CRMs through an acquisition and need them to coexist until someone makes a decision. The integration pattern you pick should match which of those situations you are actually in, because the right answer for a six-month cutover is the wrong answer for a five-year coexistence. ## Three situations, three patterns **Cutover.** Salesforce is being retired and Dynamics 365 Sales is replacing it. The integration is temporary scaffolding: it keeps both systems usable while business units move across in waves. Here the pattern is a one-way feed from the system that is still live to the system that is going live, with a hard end date. **Coexistence with a split.** Different business units, regions, or product lines will stay on different CRMs indefinitely. Each system is the system of record for its own opportunities, and the integration exists so that shared customers and shared reporting make sense. The pattern is a master-data sync for accounts and contacts, and nothing else. **Coexistence with overlap.** The same sales team touches both systems for the same customers, usually because one CRM owns a product line the other does not. This is the pattern to avoid if you can. Two-way opportunity sync between CRMs with different pipeline models is where integration projects go to die. Be honest with yourself about which one you are in. Many "coexistence" projects are really cutovers that nobody has been given permission to call a cutover. ## What to sync and what not to Accounts and contacts are the safe core. Both systems model them similarly enough that a field mapping is tractable, and a shared customer list is what most stakeholders actually want. Even here, decide on one system of record per record. A rule like "the CRM that created the account owns it, the other one holds a read-only copy" is simple and enforceable. Bidirectional ownership with last-write-wins conflict handling sounds flexible and produces silent data loss. Opportunities are where the models diverge. Salesforce stages, probability, forecast categories, and opportunity products do not line up cleanly with Dynamics 365 business process flows, pipeline phases, and product line items. If you must move opportunities, move them once as part of a wave migration, not continuously. Activities (emails, calls, tasks) are almost never worth syncing between two CRMs. They are high volume, low value across the boundary, and both systems already have their own Outlook and Gmail integrations. Let each CRM keep its own activity history and accept the gap. Leads are a special case. If marketing feeds leads into one system, route them to the right CRM at the point of creation rather than syncing after the fact. A routing rule at the front door is far cheaper than reconciling duplicate leads later. ## Tooling options **Power Automate with the Salesforce connector.** Adequate for low-volume, event-driven sync of accounts and contacts. The connector handles authentication and basic CRUD. It does not handle bulk backfills well, and flow run limits bite when a mass update on one side triggers thousands of runs. **An iPaaS (Boomi, MuleSoft, Workato, Celigo).** The default for anything with real volume or more than a handful of objects. You get retry, mapping tooling, and monitoring you would otherwise build yourself. Salesforce-heavy organisations often already own MuleSoft; use what is already paid for and understood. **Custom code against both APIs.** Dataverse Web API on one side, Salesforce REST or Bulk API on the other, with an Azure Function or a small service in between. Justifiable when the mapping logic is genuinely complex or when the integration is a short-lived cutover tool that will be thrown away. See our guide on [Azure Functions for Dynamics 365](https://www.solvingdynamics365.com/guides/azure-functions-for-dynamics-365) for the mechanics. **Dual maintenance by humans.** Do not laugh. For a three-month cutover with a small team, having reps enter shared accounts in both places is sometimes cheaper and less risky than building anything. It fails once volume or duration grows. ## Identity and matching The hardest technical problem is knowing that a Salesforce account and a Dataverse account are the same company. Store the foreign key explicitly: a Salesforce ID column on the Dataverse account and a Dataverse GUID field on the Salesforce account. Use [alternate keys in Dataverse](https://www.solvingdynamics365.com/guides/dataverse-alternate-keys) so upserts are idempotent. Never match on name alone; matching on a normalised domain or a tax registration number is better, and even that needs a human review queue for the ambiguous cases. ## Cutover sequencing For a cutover, the pattern that works is: migrate historical data once (closed opportunities, activity history) as a bulk load, then run a live sync only for open accounts, contacts, and open opportunities during the overlap window, then switch off the sync and make Salesforce read-only. Keep Salesforce accessible read-only for as long as the licence allows rather than exporting everything to a reporting database on day one; people will want to check things. ## What breaks in practice Picklist drift is the usual first failure. Someone adds a value to a Salesforce picklist, the sync has no mapping for it, and records start failing quietly. Build the integration to reject unknown values loudly and alert someone. Ownership is the second. User records do not map one-to-one across systems, especially when reps exist in only one CRM. Decide up front what owner a synced record gets on the other side. Deletes are the third. Salesforce soft-deletes to a recycle bin; Dataverse hard-deletes unless you build otherwise. Most integrations should treat deletes as a status change rather than propagating them. ## Stability verdict A one-way account and contact sync between the two CRMs is a stable, well-trodden pattern. Two-way opportunity sync is not, and any partner who tells you it is routine has not lived with one. If you are comparing the products rather than connecting them, start with [Dynamics 365 Sales vs Salesforce](https://www.solvingdynamics365.com/guides/dynamics-365-sales-vs-salesforce). --- # Integrating Dynamics 365 with Azure services How Dynamics 365 plugs into Azure — Service Bus, Logic Apps, Functions, API Management, Event Grid, and the iPaaS patterns that actually work. Source: https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-azure-services Section: Integrations / Data movement Published: 2026-05-01 ### Key facts - Logic Apps fits asynchronous, multi-system integrations with non-trivial transformations, retries, and parallel branches, such as provisioning a customer in a partner SaaS when an Account is upgraded in Dynamics. - Azure Functions serves custom transformation, lightweight APIs in front of D365, and small webhooks, and also acts as a plug-in alternative that runs asynchronously without consuming Dataverse plug-in resources. - Dataverse's Service Bus integration lets a record change publish a message to a queue or topic that downstream consumers pull at their own pace, resilient to transient consumer outages. - Azure API Management adds rate limiting, authentication, request shaping, and caching in front of D365 APIs, and is the right choice when external partners or many internal teams call those APIs and need centralised governance. - The anti-pattern across all these services is replicating the same integration work in custom code on a single VM — it works for a quarter, then becomes unmaintainable, versus paying the small overhead of managed Azure services. Dynamics 365 runs on Azure and inherits Azure's cloud services as natural integration neighbours. The right patterns depend on what kind of work the integration does. Three or four canonical shapes cover almost everything. ## Azure Logic Apps Microsoft's iPaaS-grade orchestration service. Logic Apps connectors for Dynamics 365 (Sales/CS/FS/etc. via Dataverse), Business Central, and Finance/SCM are mature. Use Logic Apps for **asynchronous, multi-system integrations** with non-trivial transformations, retries, and parallel branches. Strong fit for cross-system business processes — "when an Account is upgraded in Dynamics, provision the customer in a partner SaaS and write back the IDs to Dataverse". ## Azure Functions Serverless code, billed per execution. Use Functions for **custom transformation, lightweight APIs in front of D365, and small webhooks**. A typical pattern: a Function exposes a HTTP endpoint that incoming partner systems call; the Function authenticates, transforms, and writes to Dataverse via the SDK. Functions are also the natural home for plug-in alternatives — running asynchronously without consuming Dataverse plug-in resources. ## Azure Service Bus Reliable, queued messaging. Dataverse supports **Service Bus integration as a step**: when a record changes, Dataverse publishes a message to a Service Bus queue or topic for downstream consumers. Use Service Bus for **decoupled, high-volume, asynchronous notification** — Dataverse fires-and-forgets, consumers pull at their own pace. Resilient to transient consumer outages. ## Azure Event Grid Lightweight pub/sub for event-driven architectures. The newer alternative to Service Bus integration for some scenarios, especially when many independent subscribers care about the same events. ## Azure API Management (APIM) A façade in front of D365 (and other) APIs that adds rate limiting, authentication via subscription keys or OAuth, request shaping, caching, and developer-portal publication. Use APIM when **external partners or many internal teams call D365 APIs**, and you need centralised governance. ## Azure Data Factory / Synapse / Fabric For **bulk data integration** — initial migration, ongoing ETL, analytics extracts — ADF and Synapse pipelines orchestrate data movement using D365 entity connectors. Fabric is increasingly the destination for analytics workloads via Synapse Link. **The decision tree.** - Real-time, low-volume orchestration → Logic Apps. - High-volume eventing → Service Bus / Event Grid. - Custom code or transformation → Functions. - API governance → APIM in front of Functions/Logic Apps. - Bulk data → ADF or Synapse Link. ## The anti-pattern Doing all of the above with custom code hosted in a single VM. It works for a quarter, then becomes unmaintainable. Use managed Azure services for everything; pay the small overhead premium. ## Where to go next Service by service: [Azure Functions](https://www.solvingdynamics365.com/guides/azure-functions-for-dynamics-365), [Logic Apps](https://www.solvingdynamics365.com/guides/logic-apps-with-dynamics-365), [Service Bus](https://www.solvingdynamics365.com/guides/azure-service-bus-integration-with-dataverse), [APIM in front of Dataverse](https://www.solvingdynamics365.com/guides/apim-in-front-of-dataverse), and [Fabric](https://www.solvingdynamics365.com/guides/microsoft-fabric-and-dynamics-365). The decision that precedes all of them — low-code or Azure — is [Azure vs Power Platform](https://www.solvingdynamics365.com/guides/azure-vs-power-platform-when-to-use-which). --- # Integrating Dynamics 365 with custom mobile apps When the Power Apps mobile app and Field Service mobile are not enough — building a native or cross-platform app against Dataverse and Business Central. Source: https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-custom-mobile-apps Section: Integrations / API & identity Published: 2026-09-02 Most mobile needs on Dynamics 365 are met by apps Microsoft already ships: the Power Apps mobile app for model-driven and canvas apps, the Field Service mobile app, the Sales mobile app, the Business Central mobile app, and the Warehouse Management app for F&O. Our [Dynamics 365 mobile strategy](https://www.solvingdynamics365.com/guides/dynamics-365-mobile-strategy) guide covers when each fits. This guide is about the remaining cases, where an organisation decides to build its own app, and about what integrating that app with Dynamics 365 actually involves. ## When a custom app is justified - **Customers or the public are the users.** Microsoft's mobile apps are for licensed internal users. A customer-facing app for booking, tracking, or self-service needs its own identity model and cannot put a Dynamics 365 licence in every customer's hand. - **The experience is the product.** A consumer-grade UX, hardware integration (scanners, sensors, payment terminals), or platform features the Power Apps container does not expose. - **The Dynamics 365 part is small.** The app does many things and Dynamics 365 is one data source among several. Wrapping all of it in a canvas app would be backwards. - **Offline needs exceed what the platform offers.** Field Service mobile and canvas offline are capable but opinionated; some workloads need full control of the local store and sync logic. If none of those apply, build in Power Apps. A custom app costs an order of magnitude more to maintain, and the platform apps get better every release without your involvement. ## The integration surface For Dataverse-based apps (Sales, Customer Service, Field Service, custom tables), the app talks to the Dataverse Web API, an OData v4 REST endpoint. For Business Central, it is the API v2.0 pages or custom API pages, also OData. For Finance and Operations, data entities over OData or custom services. All three are HTTPS and JSON, and all three have request throttling that a chatty mobile app will hit. See [batch operations in the Dataverse Web API](https://www.solvingdynamics365.com/guides/batch-operations-in-the-dataverse-web-api) for how to reduce round trips. The first architectural decision is whether the app calls Dynamics 365 directly or goes through a backend of your own. For internal users with Entra ID accounts and a licence, direct calls with delegated authentication are acceptable. For customers, for any app you cannot fully trust, and for any app that needs to combine data from several systems, put an API in front: an Azure Function app or a small web API, fronted by API Management, that holds the service identity and applies its own authorisation. See [APIM in front of Dataverse](https://www.solvingdynamics365.com/guides/apim-in-front-of-dataverse) and [API gateway patterns](https://www.solvingdynamics365.com/guides/api-gateway-patterns-for-dynamics-365). This is also where the licensing question gets resolved: an external user reaching Dataverse through a multiplexing backend still needs an appropriate licence position, and the backend should be designed with that reviewed rather than discovered at audit. ## Authentication Internal users: MSAL on the device, an app registration with delegated Dataverse permissions, and the user's own Entra ID sign-in. The user's Dataverse security roles apply, which is what you want. Conditional access and Intune app protection policies apply too, if the app is registered for them. External users: Entra External ID or Azure AD B2C on the device for the customer's identity, exchanged at your backend for a call to Dataverse under a service principal, with your backend enforcing that the customer only sees their own rows. See [B2C authentication with Dynamics 365](https://www.solvingdynamics365.com/guides/b2c-authentication-with-dynamics-365). Never ship a client secret in a mobile app; assume anything in the binary is public. ## Offline and sync This is where custom apps earn their cost and where they fail. A local store (SQLite is the usual choice), a sync engine that pulls changes since a watermark and pushes local edits, and conflict handling for the cases where the server changed too. Dataverse supports this pattern through [change tracking](https://www.solvingdynamics365.com/guides/change-tracking-in-dataverse), which returns only what changed since a token; use it rather than polling full tables. Business Central has no change tracking on standard APIs, so a modified-date filter on custom API pages is the practical equivalent. Design the conflict rules per table before writing the sync. "Server wins" is fine for reference data; "last edit wins with an audit record" is usually right for field-entered data; some tables need the user to choose. See [canvas app offline mode](https://www.solvingdynamics365.com/guides/canvas-app-offline-mode) for how the platform handles it, which is a reasonable model to copy. ## Framework choice .NET MAUI is the natural fit for teams already in the Microsoft ecosystem, with MSAL and the Dataverse SDK available. React Native and Flutter are equally viable; the Dynamics 365 side is plain REST and does not care. Pick what the team can maintain for five years, because that is how long the app will live. ## Cost of ownership An app store presence, OS version churn, device testing, certificate renewals, and the Dynamics 365 API evolving underneath. Budget a permanent fraction of a developer, not a one-off project. Organisations that do not have that budget should not build a custom app. ## What breaks in practice Token expiry handled badly, so users are logged out mid-task. Sync that works on Wi-Fi and fails on a real mobile network. API throttling during a morning login storm. A Dataverse column renamed by an administrator who did not know an app depended on it. App store review delays on the day a critical fix is needed. ## Stability verdict The APIs are stable and well documented, and the authentication libraries are mature. The instability is entirely in the app you build and the sync you own. A custom app justified by one of the reasons above, with a backend in front of Dynamics 365 and a maintenance budget, is a sound pattern. One built because someone did not like the look of the Power Apps mobile app will be regretted. --- # Integrating Dynamics 365 with DocuSign and Adobe Sign E-signature patterns for Dynamics 365 Sales, Customer Service, and Business Central — the vendor-built apps, the Power Automate route. Source: https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-docusign-and-adobe-sign Section: Integrations / Third-party systems Published: 2026-09-02 Quotes, contracts, order confirmations, and work completion forms all end in a signature, and the signature almost always happens in DocuSign or Adobe Acrobat Sign rather than anything Microsoft ships. Both vendors have invested in Dynamics 365 for years, so the integration options are mature. The choice between them is less about capability and more about how deeply you want signing woven into the CRM, and how much you trust a vendor-managed solution in your environment. ## Route 1: the vendor's Dynamics 365 app Both DocuSign and Adobe offer a managed solution from AppSource that installs into Dataverse. Each adds a "send for signature" command to the ribbon on the tables you configure, a status table that tracks envelopes or agreements, and a pane on the record showing who has signed and when. Templates can be pre-mapped to Dynamics 365 fields so the recipient's name, the quote total, and the account address populate without anyone typing. When signing completes, the signed PDF is attached back to the record, typically as a note or, better, to the SharePoint folder if [SharePoint document management](https://www.solvingdynamics365.com/guides/sharepoint-document-management-for-dynamics-365) is enabled. This is the route most Sales teams should take. It is supported by the vendor, it keeps users inside the form, and it handles the status polling and webhook plumbing for you. The downsides are real. The managed solution has its own release cadence and occasionally lags a Dynamics 365 wave. It adds tables and a plug-in set to your environment that you did not write. Customising the behaviour beyond what its configuration allows means working around it rather than with it. And licensing is separate: the vendor's e-signature plan plus, in some cases, a specific tier for the CRM connector. ## Route 2: Power Automate with the vendor connector Both vendors have premium Power Automate connectors. A flow triggers on a Dataverse event (quote activated, work order completed), generates or fetches the document, creates the envelope or agreement with the recipients from the record, and a second flow, triggered by the vendor's completion event, retrieves the signed PDF and stores it. Status updates flow back to a custom column. This route suits organisations that want signing to happen without a user clicking anything (automated order confirmations, renewal contracts) or that need signing on tables and processes the vendor app does not cover, such as Business Central documents or a Power Pages flow. It is also the route when the AppSource solution is not permitted in your environment. You are now maintaining the integration. Envelope creation, template mapping, error handling, and the completion webhook are yours. See [Power Automate connectors for Dynamics 365](https://www.solvingdynamics365.com/guides/power-automate-connectors-for-dynamics-365) for the licensing and limits of premium connectors. ## Route 3: the vendor's REST API from code An Azure Function or a plug-in calling the DocuSign eSignature API or the Adobe Sign API directly. Justified when the document generation is complex (multi-document envelopes, conditional fields, embedded signing inside a portal) or when volume makes flow runs expensive. The APIs are well documented and the SDKs are decent. Most organisations do not need this. ## Business Central Business Central has no first-party e-signature feature. ISV apps on AppSource bridge to both vendors for sales quotes, orders, and purchase documents, and the Power Automate route works for anything you can render as a PDF from a report. For most small businesses the ISV app is the pragmatic choice; for anyone already running flows against Business Central, the connector route avoids another per-user licence. ## Where the signed document should live Not in Dataverse as a note attachment, unless the volume is small. Signed contracts are large PDFs, kept for years, and Dataverse file storage is expensive; see [Dataverse storage types](https://www.solvingdynamics365.com/guides/dataverse-storage-types-explained). Put them in SharePoint through the standard document integration, or in the vendor's own archive with a link on the record, or in a dedicated document store if the organisation has one. Keep the audit certificate the vendor produces alongside the PDF; that is what a dispute will require. ## Document generation is the hidden project The signature step is easy. Producing the document that gets signed is where the effort goes. Word templates in Dynamics 365 handle simple quotes; see [document templates and Word mail merge](https://www.solvingdynamics365.com/guides/document-templates-and-word-mail-merge). Complex contracts with clause libraries and conditional sections need a document generation tool, and that tool's output must be mapped into the vendor's template with signature tabs in the right places. Budget for this separately from the integration. ## What breaks in practice Recipients whose email on the record is stale, so the envelope goes to the wrong person and the status shows "sent" forever. Templates edited in the vendor's portal without updating the field mapping, so merged fields go blank. Completion webhooks blocked by a firewall change or a DLP policy, so documents sign but never come back. Users who send documents from the vendor's own app rather than from Dynamics 365, so the record never knows. Build a reconciliation: a weekly list of envelopes in "sent" state older than a threshold, and a check that every completed envelope has a stored PDF. ## Stability verdict The vendor apps are mature and stable, with the usual caveat that a managed third-party solution in your environment is a dependency you should track. The Power Automate route is stable when the flows are small and monitored. Neither vendor is going anywhere, and the choice between DocuSign and Adobe should be made on commercial terms and the rest of the organisation's tooling, not on the Dynamics 365 integration, which is comparable for both. --- # Integrating Dynamics 365 with HubSpot How to run HubSpot for marketing alongside Dynamics 365 Sales — the native HubSpot sync, what it moves, where it stops. Source: https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-hubspot Section: Integrations / Third-party systems Published: 2026-09-02 A common landscape: marketing runs HubSpot, sales runs Dynamics 365 Sales, and the two teams need leads, contacts, and engagement to flow between them without a nightly spreadsheet. HubSpot is popular enough that this integration is well-trodden, and the patterns are clear. The question is less "can it be done" and more "which of the three ways to do it matches how much you care about data quality". If the question is whether to keep HubSpot at all or move marketing onto Customer Insights - Journeys, that is a different discussion: see [Customer Insights - Journeys vs HubSpot](https://www.solvingdynamics365.com/guides/customer-insights-journeys-vs-hubspot). ## Pattern 1: HubSpot's native Dynamics 365 sync HubSpot ships a Dynamics 365 integration in its marketplace, managed from the HubSpot side. It syncs contacts, companies, and deals (mapped to opportunities) in either direction, with field mappings you configure in HubSpot and sync rules that decide which system wins for each field. What it does well: it exists, it is supported by HubSpot, marketing can administer it without a developer, and for the standard objects it gets a mid-sized organisation running in a day. Where it stops: custom Dataverse tables, complex ownership rules, and anything that depends on Dynamics 365 business logic firing correctly. The sync writes through the Dataverse API as an application user, so plug-ins and flows do fire, but the sync engine has no idea about your business process flow stages or your lead qualification rules. Activity sync is limited. Field mapping is per-field and does not support transformations beyond simple ones, so a picklist that differs between the two systems needs manual alignment. For most organisations this is the right starting point. Try it before building anything. ## Pattern 2: Power Automate with the HubSpot connector The Power Automate HubSpot connector plus the Dataverse connector lets you build the sync yourself as flows. This buys you control over exactly what triggers what, transformation logic in the flow, and the ability to involve custom tables and Dynamics 365-specific concepts such as lead qualification. The cost is that you now own a sync engine built from flows. Retries, conflict handling, and backfills are yours to design, and a bulk update on the HubSpot side will trigger a flood of flow runs that can exhaust your daily limits. This pattern suits a narrow, well-defined feed, such as "new marketing-qualified leads in HubSpot become leads in Dynamics 365 with these five fields", rather than a full bidirectional contact sync. See [Power Automate connectors for Dynamics 365](https://www.solvingdynamics365.com/guides/power-automate-connectors-for-dynamics-365) for the platform's limits. ## Pattern 3: iPaaS or custom code Boomi, Workato, Zapier, Make, Azure Functions against both APIs. The right answer when the data model is genuinely bespoke, when volumes are high, or when you need one integration platform across many systems anyway. Rarely justified for HubSpot alone. ## The lead hand-off is the design problem Whatever the tooling, the decision that matters is where the lead lives at each stage. The pattern that works: - HubSpot owns the contact while it is a marketing prospect. Email engagement, form fills, and scoring stay in HubSpot. - When HubSpot marks the contact as marketing-qualified, a lead is created in Dynamics 365 with the HubSpot contact ID stored on it. - Sales works the lead in Dynamics 365. Qualification creates the account, contact, and opportunity. - The resulting Dynamics 365 contact and account are pushed back to HubSpot with their Dataverse IDs, so future marketing activity can be attributed and so HubSpot stops treating the person as a prospect. - Opportunity stage and closed outcome flow back to HubSpot for marketing attribution reporting. The two mistakes are syncing every HubSpot contact into Dynamics 365 as a lead, which fills the CRM with people sales will never call, and syncing nothing back, which leaves marketing blind to what happened after the hand-off. ## Matching and duplicates Email is the natural match key and it is the wrong one to rely on alone. People use multiple addresses, shared inboxes exist, and HubSpot's contact model is person-centric while Dynamics 365 separates leads from contacts. Store the cross-system IDs explicitly on both sides, use a [Dataverse alternate key](https://www.solvingdynamics365.com/guides/dataverse-alternate-keys) for upserts, and run [duplicate detection rules](https://www.solvingdynamics365.com/guides/duplicate-detection-rules-in-dataverse) on the Dynamics 365 side as a safety net. ## Consent and unsubscribes Marketing consent must be a single source of truth. If HubSpot manages consent and Dynamics 365 users can also send bulk email, an unsubscribe in one system must reach the other within a time the legal team accepts. This is the one field that should sync in both directions promptly, and it deserves its own monitoring. ## What breaks in practice Ownership. HubSpot owners and Dynamics 365 users are separate identity sets; map them explicitly and decide who owns records when the mapping fails. Company matching. HubSpot creates companies from email domains automatically; Dynamics 365 accounts are created by people. Expect a reconciliation exercise in the first month. Sync loops. A field updated by the sync triggers a flow that updates a field that triggers the sync. Mark integration writes with an application user and filter on it. ## Stability verdict The native HubSpot sync is stable for standard objects and is where most organisations should stay. Custom-built syncs are stable when narrow and fragile when they try to mirror everything. Sync the hand-off, not the databases. --- # Integrating Dynamics 365 with Mailchimp and SendGrid Two different email problems — bulk marketing through Mailchimp and transactional email through SendGrid — and the patterns for each against Dynamics 365 Sales. Source: https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-mailchimp-and-sendgrid Section: Integrations / Third-party systems Published: 2026-09-02 Mailchimp and SendGrid get mentioned in the same breath and solve almost opposite problems. Mailchimp is a marketing platform: audiences, campaigns, templates designed by a marketer, and consent management. SendGrid is a delivery engine: an API that sends the email your system tells it to, at volume, with deliverability tooling. Dynamics 365 integrates with both, but for different reasons, and confusing the two leads to marketing emails sent from a transactional pipe with no unsubscribe link, or order confirmations built as Mailchimp campaigns. ## Mailchimp: audience sync, not email sync The integration people want is "keep the Mailchimp audience in step with Dynamics 365 contacts". The pattern that works: - Dynamics 365 is the source of who exists. Contacts with a marketing consent flag and a valid email flow to a Mailchimp audience, with segment tags derived from Dynamics 365 fields (customer type, region, product interest). - Mailchimp is the source of engagement and consent changes. Unsubscribes, bounces, and campaign opens flow back to Dynamics 365, at minimum as a consent field update and ideally as activity records for the sales team's benefit. - Campaigns are designed and sent in Mailchimp. Nobody tries to trigger Mailchimp campaigns from Dynamics 365 workflows; that is not what Mailchimp is for. Tooling: the Power Automate Mailchimp connector handles member add and update. Mailchimp's own marketplace has Dynamics 365 connectors from third parties that do the full bidirectional sync with field mapping and are usually worth their subscription for a marketing team that does not want to own flows. For large audiences, batch through the Mailchimp API rather than one flow run per contact. The consent field is the one that must be right. An unsubscribe in Mailchimp that does not reach Dynamics 365, followed by a sales rep's bulk email from Dynamics 365, is a compliance incident. Sync that field both ways, promptly, and test it. See [email templates and bulk email in Sales](https://www.solvingdynamics365.com/guides/email-templates-and-bulk-email-in-sales) for what Dynamics 365 itself can send. If the organisation is deciding whether to keep Mailchimp or move marketing onto Customer Insights - Journeys, the comparison with [HubSpot](https://www.solvingdynamics365.com/guides/customer-insights-journeys-vs-hubspot) applies in most respects; the trade-off is native Dataverse integration against a tool the marketing team already knows. ## SendGrid: transactional email from your own logic SendGrid is for email that a process sends: order confirmations, password resets on a portal, case update notifications, invoice delivery. Dynamics 365 can send these itself through its server-side sync or through Business Central's SMTP and Microsoft 365 email setup, and for modest volumes it should. SendGrid enters when volume is high, when deliverability tooling matters (dedicated IPs, domain authentication, bounce and spam handling), when the sending system is a portal or an Azure Function rather than Dynamics 365 itself, or when the mail must not go through the corporate Exchange tenant. Patterns: - **Power Automate with the SendGrid connector.** A flow on a Dataverse event calls SendGrid with a dynamic template ID and the merge data. Simple and fine for hundreds of emails a day. - **Azure Function calling the SendGrid API.** For volume, for attachments generated on the fly, and for retries and logging that flows make awkward. - **Business Central through SMTP.** SendGrid exposes an SMTP relay, and Business Central's email accounts feature can use it as an SMTP account, which routes document sending through SendGrid with no code. See [email setup in Business Central](https://www.solvingdynamics365.com/guides/email-setup-and-outgoing-email-in-business-central). Events back: SendGrid's event webhook reports delivered, bounced, opened. Receive it in an HTTP-triggered flow or function and write the status to the record. Bounces in particular should update the contact so that the next process does not send to a dead address. ## Which system is the sender Every email leaving on the organisation's behalf needs a decision about the sending domain and authentication (SPF, DKIM, DMARC). Mailchimp and SendGrid both need domain authentication configured, and if Dynamics 365 or Microsoft 365 also sends from the same domain, the DNS records must accommodate all of them. Deliverability failures traced to a missing DKIM record for a third sender are common. Our [email deliverability](https://www.solvingdynamics365.com/guides/email-deliverability-for-customer-insights-journeys) guide covers the DNS side, and it applies regardless of which tool sends. ## Activity tracking Sales users want to see marketing and transactional emails on the contact timeline. For Mailchimp, campaign sends and opens can be written back as custom activities; keep them summarised, because one activity per open across a large audience will bloat Dataverse quickly. For SendGrid transactional mail, write one activity per email at most, and only for emails a human would care to see. ## What breaks in practice Consent drift, as above. Audience sync that creates Mailchimp members for contacts who never consented. Merge fields in a SendGrid template that were renamed in Dataverse. Bounce events that nobody consumes, so the same dead address is emailed monthly. DNS records that were correct for two senders and broke when the third was added. ## Stability verdict Both connectors are stable and both vendors' APIs are mature. The Mailchimp sync is stable when narrow (contacts and consent, both directions) and fragile when it tries to mirror engagement in detail. SendGrid via an Azure Function or SMTP relay is as stable as any transactional email pipe gets. The organisational instability is ownership: marketing owns Mailchimp, IT owns SendGrid, and the consent field sits between them. --- # Integrating Dynamics 365 with NetSuite during a migration The coexistence and data-extraction patterns for moving from NetSuite to Dynamics 365 — SuiteTalk, SuiteQL, saved searches, parallel running. Source: https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-netsuite-during-migration Section: Integrations / Third-party systems Published: 2026-09-02 Nobody integrates NetSuite with Dynamics 365 for the long term. They integrate the two because they are leaving NetSuite and the leaving takes longer than one weekend. This guide is about the integration work inside that window: getting data out of NetSuite reliably, keeping the two systems coherent while both are live, and sequencing the cutover so the integration can be switched off cleanly. For the functional side of the migration, the module mapping and the licensing arithmetic, see [migrating from NetSuite to Business Central](https://www.solvingdynamics365.com/guides/migrating-from-netsuite-to-business-central). ## Getting data out of NetSuite NetSuite offers more extraction routes than most systems, and they are not equivalent. **Saved searches exported to CSV.** The route every NetSuite administrator already knows. Fine for one-off extracts of master data and for reconciliation reports. Poor for anything repeated, because saved searches are hand-maintained and a column added in week three quietly changes the file layout. **SuiteAnalytics Connect (ODBC/JDBC).** Direct SQL-style access to NetSuite's data model. This is the best route for bulk historical extraction: you can pull years of transaction lines in one pass, join across records, and script it. It needs a separate licence and a service account, and the schema is NetSuite's internal one, so expect to spend time understanding transaction line tables. **SuiteTalk REST and SOAP web services.** The API for record-level operations. Use them for the live sync during the overlap window, not for bulk history; concurrency governance limits will throttle a naive bulk pull. **SuiteQL through the REST API.** A query language over the same model SuiteAnalytics exposes, but callable over REST without the ODBC licence. Good middle ground for scripted, repeatable extracts when you cannot get Connect approved. The practical answer for most projects: SuiteAnalytics Connect or SuiteQL for history, SuiteTalk for anything that must stay in sync during parallel running, and saved searches for reconciliation. ## Getting data into Dynamics 365 Business Central takes bulk loads through configuration packages (RapidStart) and, for larger volumes, through API pages or an extension-based import. Finance and Operations takes them through the Data Management Framework; see our [DMF deep dive](https://www.solvingdynamics365.com/guides/data-management-framework-deep-dive). Both prefer clean, pre-mapped files. Do the transformation between extract and load in a staging database or a proper ETL tool, not in Excel, so you can rerun it. You will rerun it. ## What to migrate versus what to leave Open items and balances, yes: open AR and AP, open sales and purchase orders, inventory quantities and costs, fixed asset registers, and opening trial balances. Closed history is the argument. Loading years of posted NetSuite transactions into Dynamics 365 as real postings is expensive, distorts your new ledger with old account structures, and rarely earns its keep. The usual compromise is to load summarised historical balances by period and keep NetSuite in read-only mode, or export its history to a reporting database, for lookups. NetSuite customisations, SuiteScripts, and custom records need a decision each: rebuild, replace with standard functionality, or drop. The migration is the one chance to drop things. ## Coexistence during parallel running The safest overlap is short and one-directional. Pick the go-live date, freeze master-data creation in NetSuite a week before, load Dynamics 365, and run the cutover. If the business insists on a phased approach by entity or subsidiary, you now need a live sync for whatever is shared across the boundary, which in practice is customers, vendors, items, and intercompany transactions. For that sync, one system owns each record type. NetSuite keeps ownership of subsidiaries still running on it; Dynamics 365 owns the migrated ones. Master data shared by both goes one way from the system that is still the long-term home. Building bidirectional master-data sync for a temporary overlap is money you will not get back. Tooling for the live sync is the usual set: Power Automate with an HTTP action against SuiteTalk for low volumes, an iPaaS such as Celigo (which is deeply NetSuite-native), Boomi, or Workato for anything with more than a couple of objects, and Azure Functions if you would rather own code than a subscription. ## Reconciliation is the real deliverable Every load needs a reconciliation report that a finance person, not an integration developer, can read. Record counts by type, control totals for balances, and a sample-level comparison of key records. Run it after every trial load, and make sign-off on it a formal gate. Migrations that go wrong are almost never wrong because of the extraction technology; they are wrong because nobody compared the two trial balances properly before go-live. ## Cutover sequencing The order that works: freeze NetSuite master data, extract and load master data, reconcile, extract and load open transactions and balances as of the cut date, reconcile again, open Dynamics 365 for transactions, switch NetSuite to read-only. If a live sync existed during a phased overlap, disable it before the final balance load, not after, so the two systems cannot drift during the reconciliation window. Keep NetSuite access for at least one full audit cycle. Contracts often lapse before the auditors ask their questions. ## What breaks in practice Currency and tax setups that were implicit in NetSuite becoming explicit in Dynamics 365, and turning out to have been wrong all along. Item costing methods that do not match, so inventory values differ at cutover and need an explicit revaluation. Subsidiary structures in NetSuite OneWorld that map awkwardly onto Business Central companies or F&O legal entities. None of these are integration problems; they surface through the integration and are solved in the design. ## Stability verdict The extraction tools are mature and the load tools on the Dynamics 365 side are mature. The risk sits entirely in scope decisions and reconciliation discipline. A migration that treats the integration as a short-lived tool, with a clear switch-off date, goes well. One that lets a "temporary" sync become permanent ends up running two ERPs. --- # Integrating Dynamics 365 with SAP S/4HANA How Dynamics 365 Finance, Supply Chain, or Business Central coexists with SAP S/4HANA at group level — what to integrate, which SAP interfaces to use. Source: https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-sap-s4hana Section: Integrations / Third-party systems Published: 2026-09-02 ### Key facts - In a two-tier landscape, the group ledger, consolidation, and treasury stay in SAP while the subsidiary runs day-to-day operations in Dynamics 365, with only a well-defined data subset crossing the boundary. - Financial results moving upward as trial balances or summarised journal lines on a monthly or weekly cadence is the one integration every two-tier landscape has, and it is batch by nature — nobody consolidates in real time. - SAP-side interfaces include OData services (the most approachable, used by the Power Platform SAP ERP connector), IDocs for asynchronous document exchange, and BAPIs/RFCs for synchronous calls requiring an on-premises data gateway. - The Power Platform SAP ERP connector works for low-volume lookups, such as pulling an SAP vendor into a Dynamics 365 form, but is not a platform for financial postings. - Chart-of-accounts mapping between the subsidiary's local chart and the group chart should happen in the middle layer or in Dynamics 365 before extraction, not inside SAP, so the SAP team receives clean group-chart postings. Two-tier ERP is the arrangement where a group runs SAP S/4HANA at headquarters and something lighter in its subsidiaries, plants, or newly acquired businesses. Dynamics 365 Finance and Supply Chain Management, and increasingly Business Central, are the usual candidates for that second tier. The integration between the tiers is what makes the arrangement work, and it is where most of the effort goes. ## What two-tier actually means The group ledger, consolidation, treasury, and often central procurement live in SAP. The subsidiary runs its day-to-day operations in Dynamics 365: local sales, purchasing, inventory, and its own statutory ledger. The integration moves a small, well-defined set of data between them. If you find yourself designing a real-time replication of every transaction into SAP, you have not designed a two-tier landscape; you have designed a very expensive way of running SAP twice. ## The data that crosses the boundary **Financial results upwards.** Trial balances or summarised journal lines, mapped from the subsidiary's chart of accounts to the group chart, on a monthly or weekly cadence. This is the one integration every two-tier landscape has, and it is batch by nature. Nobody consolidates in real time. **Master data downwards.** Group-managed customers, vendors, and items pushed from SAP to the subsidiary so that intercompany trading uses the same identifiers. Whether SAP or Dynamics 365 owns which master data needs a written decision per entity type; "SAP owns everything" is common and usually wrong for local-only vendors. **Intercompany transactions both ways.** A purchase order in the subsidiary becomes a sales order in SAP, and the invoice flows back. This is the integration that looks simple on a whiteboard and is not. Pricing, tax, currency, and partial deliveries all need explicit handling. **Reference data downwards.** Exchange rates, group cost centres, reporting dimensions. Low volume, high annoyance when they drift. ## SAP-side interfaces You will be talking to one of these: - **OData services** on S/4HANA (the SAP Gateway APIs). The most approachable option and the one the Power Platform SAP ERP connector and most iPaaS tools use. Coverage is broad but not complete. - **IDocs** for classic asynchronous document exchange. Old, robust, and still the backbone of many SAP integrations. Good for orders and invoices; painful to debug without SAP-side skills. - **BAPIs / RFCs** for synchronous function calls. Powerful, requires RFC connectivity and an on-premises data gateway or equivalent when S/4HANA is not internet-exposed. - **SAP Integration Suite** (formerly CPI) as SAP's own middleware. If the group already runs it, expect the SAP team to insist it sits in the middle. The Dynamics 365 side is easier: data entities and the OData endpoint in F&O (see [custom services and OData in F&O](https://www.solvingdynamics365.com/guides/custom-services-and-odata-in-f-and-o)), or API pages in Business Central. ## Choosing the middle layer Something should sit between the two ERPs. Direct point-to-point calls between SAP and Dynamics 365 are brittle and put SAP credentials in places the SAP team will not like. For groups with an SAP Integration Suite investment, use it. For groups with an Azure-first posture, Logic Apps or Azure Functions plus Service Bus is the natural fit (see [Logic Apps with Dynamics 365](https://www.solvingdynamics365.com/guides/logic-apps-with-dynamics-365) and [Azure Service Bus with Dataverse](https://www.solvingdynamics365.com/guides/azure-service-bus-integration-with-dataverse)). For groups that already own Boomi or MuleSoft, use that. The technology matters less than having one place where mappings, retries, and logs live. The Power Platform SAP ERP connector deserves a mention because it is tempting: it lets a Power Automate flow call a BAPI directly. It works for low-volume tasks like looking up an SAP vendor from a Dynamics 365 form. It is not a platform for financial postings. ## Chart of accounts mapping This is the design decision that outlives everything else. The subsidiary needs a local chart for statutory reporting and a mapping to the group chart for consolidation. In F&O, financial dimensions and a mapping table handle this well; in Business Central, a dedicated mapping table in an extension is the usual approach. Do the mapping in the middle layer or in Dynamics 365 before extraction, not inside SAP, so the SAP team receives clean group-chart postings and does not need to know the subsidiary's structure. ## Intercompany in practice The order-to-invoice loop between tiers is where projects overrun. Settle these before building: - Which system generates the intercompany document number, and does the other system store it as a reference? - What happens on a partial delivery from SAP against a subsidiary purchase order? - Whose price list wins, and how are transfer-pricing adjustments posted? - Is tax calculated in the seller's system only, with the buyer trusting the invoice? Answers that involve "the finance team will fix it manually at month end" are acceptable for launch and a problem by year two. ## What stalls two-tier projects The SAP team and the Dynamics 365 team having different change calendars. SAP release cycles are slow and heavily governed; Dynamics 365 updates arrive monthly. Interface contracts need versioning and a test environment on both sides that actually match production. Master data governance being unowned. If nobody owns the group vendor list, both systems will accumulate duplicates and the intercompany matching will decay. Underestimating SAP access. Getting a service user with the right authorisations on S/4HANA, in a group where SAP security is tightly controlled, can take longer than building the integration. ## Stability verdict Financial-results-up and master-data-down are mature, well-understood patterns and you should expect them to run unattended once live. Automated intercompany order-to-invoice is achievable but is a proper project with SAP-side involvement, not a connector you switch on. If you are still deciding whether the second tier should be Dynamics 365 at all, read [Dynamics 365 vs SAP](https://www.solvingdynamics365.com/guides/dynamics-365-vs-sap) first. --- # Integrating Dynamics 365 with Stripe and PayPal Payment integration patterns across Dynamics 365 — pay-by-link from Business Central and Sales, webhook-driven reconciliation, portal checkout. Source: https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-stripe-and-paypal Section: Integrations / Third-party systems Published: 2026-09-02 Taking a payment from inside Dynamics 365 is a request that arrives from every direction: finance wants a "pay now" link on invoices, sales wants deposits on quotes, service wants to charge for a call-out, and the web team wants checkout on a portal. Stripe and PayPal are the two providers most organisations already have accounts with. The integration patterns are well understood, and the first thing to understand is that none of them involve Dynamics 365 ever touching a card number. ## The rule that shapes everything Card data stays with the payment provider. Dynamics 365 sends the provider an amount and a reference, the customer pays on the provider's hosted page or element, and the provider tells Dynamics 365 the outcome. Any design that has card details entering a Dataverse column, a Business Central field, or a canvas app text box is a PCI DSS scope problem and should be stopped before it is built. Business Central's own guidance on [credit card handling](https://www.solvingdynamics365.com/guides/credit-card-handling-in-business-central) reflects the same principle. ## Pattern 1: pay-by-link on documents The simplest and most valuable pattern. A sales invoice or quote carries a link to a hosted payment page; the customer clicks, pays, and a webhook from the provider marks the document paid. In Business Central, the standard payment services feature and the PayPal extension have existed for years for exactly this: a PayPal Payments Standard link on the invoice email and PDF. Stripe is covered by ISV extensions on AppSource that do the same with Stripe Checkout, and some add automated application of the payment to the customer ledger when the webhook arrives. Check whether the extension posts the payment journal for you or only records the reference; the former saves the finance team real time. In Dynamics 365 Sales, there is no first-party feature. The route is a Power Automate flow that creates a Stripe Payment Link or a PayPal invoice when a quote reaches a stage, writes the URL to the record, and includes it in the email template. The completion webhook, received by an HTTP trigger flow or an Azure Function, updates the quote and, if you have order-to-cash integrated, tells the ERP. ## Pattern 2: portal checkout Customers paying on a Power Pages portal, for a service, a renewal, or an event. Stripe Elements or PayPal Checkout are embedded in the portal page as client-side components, so the card data goes straight to the provider. The portal calls a server-side endpoint, usually an Azure Function, to create the payment intent with the amount from Dataverse and to receive the confirmation. Never create the payment intent client-side with a secret key in the page. See [Power Pages for customer portals](https://www.solvingdynamics365.com/guides/power-pages-for-customer-portals) for the portal side. ## Pattern 3: stored payment methods and recurring charges Subscriptions and repeat billing. The provider stores the payment method and gives you a customer token; Dynamics 365 stores the token, never the card. Charges are initiated server-side against the token, typically from a scheduled Azure Function or a flow that reads due items from Dataverse or Business Central. Stripe Billing and PayPal Subscriptions can run the schedule themselves, in which case Dynamics 365 just receives the invoice-paid events. Decide early which system owns the billing schedule; two systems both generating charges is a refund exercise waiting to happen. ## Pattern 4: point of sale and field payments Dynamics 365 Commerce has its own payment connector framework and certified processors, and Stripe Terminal or PayPal Zettle are not first-class there; if Commerce is in scope, the choice of processor is a Commerce decision. For Field Service technicians taking a payment on site, the practical pattern is a payment link sent by SMS or email from the work order, or a Stripe Terminal reader driven by a separate app, with the result written back through a flow. ## Reconciliation is the real integration The payment succeeding is the easy half. Money arriving in the bank is net of fees, batched daily, and does not match invoice by invoice. Stripe and PayPal both provide payout reports and APIs. The finance team needs a process that imports the payout, applies the individual payments to the customer ledger, and posts the fees. Business Central handles this well through the bank reconciliation and payment journal tooling if the extension records the provider's transaction ID on each payment; without that ID, matching is manual. For F&O, it is a bank statement import plus a matching rule. Do not consider the integration done until finance can close a month without touching a spreadsheet. ## Webhooks and idempotency Providers retry webhooks. Your receiver will see the same event more than once, and sometimes out of order. Store the provider's event ID and ignore repeats; make the "mark as paid" operation safe to run twice. See [idempotency in Dynamics 365 integrations](https://www.solvingdynamics365.com/guides/idempotency-in-dynamics-365-integrations). Verify webhook signatures; an unauthenticated endpoint that marks invoices paid is a fraud vector. ## What breaks in practice Currency mismatches between the document and the provider account. Refunds issued in the provider's dashboard that never reach Dynamics 365. Payment links on documents that were later revised, so the customer pays the old amount. Test mode keys promoted to production. Each of these is a monitoring item, not a rare edge case. ## Stability verdict Pay-by-link and portal checkout are stable, well-trodden patterns with good tooling on both providers' sides. The Business Central extensions are mature; the Sales side is a flow-based build you own. The instability is in reconciliation and in the operational edges, which is where the project time should go. --- # Integrating Dynamics 365 with Twilio for SMS and voice When Twilio is the right choice next to Dynamics 365's own channels, and the patterns for outbound SMS, inbound replies, click-to-call. Source: https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-twilio Section: Integrations / Third-party systems Published: 2026-09-02 Twilio comes up in Dynamics 365 projects for two reasons. One is that Dynamics 365 Customer Service's own SMS channel supports Twilio as a provider, so contact centres already use it under the hood. The other is that everywhere else in Dynamics 365, there is no built-in SMS or voice at all, and Twilio's API is the quickest way to get a text message or a phone call out of a business process. The patterns are different enough for those two cases that they are worth separating. ## Inside Customer Service: Twilio as a channel provider Customer Service's omnichannel capabilities let agents handle SMS conversations in the agent workspace, with routing, queues, and transcripts like any other channel. Twilio is one of the supported SMS providers: you register a Twilio number and credentials in the channel configuration and the platform handles the rest. Agents never see Twilio. See [WhatsApp and SMS channels in Customer Service](https://www.solvingdynamics365.com/guides/whatsapp-and-sms-channels-in-customer-service) for the channel setup and licensing. For voice, Microsoft's own Azure Communication Services is the native path, and Twilio Voice is not a supported provider for the omnichannel voice channel. Organisations with a Twilio Flex contact centre generally keep Flex and integrate it with Dynamics 365 through Twilio's CRM integration or a custom agent desktop, which is a different project. Our [omnichannel voice](https://www.solvingdynamics365.com/guides/omnichannel-voice-in-customer-service) guide covers the native option. If the requirement is agents having two-way SMS conversations with customers, use the channel. Do not build it. ## Outside Customer Service: Twilio as an API Everything else is process-driven messaging: an appointment reminder from Field Service, a delivery notification from an order, a one-time code from a portal, a "your quote is ready" text from Sales. None of these need an agent, and all of them are an API call. **Power Automate with the Twilio connector.** A flow on a Dataverse event sends an SMS with the connector's send action. This covers most notification scenarios in an afternoon. Keep the message template in an environment variable or a Dataverse configuration table, not hard-coded in the flow. **Azure Function calling the Twilio API.** For volume, for messaging services with sender pools and compliance features, for scheduled sends, and for anything that needs retry logic and logging. Also the route when messages originate from Business Central or F&O, where a flow or a Logic App triggered by a business event calls the function. **Inbound replies.** Twilio delivers inbound SMS to a webhook you configure on the number. An HTTP-triggered flow or a function receives it, matches the sender's number to a contact, and creates an activity or updates a record ("reply YES to confirm" on a work order). Matching by phone number is unreliable enough that the message should carry a reference the reply can echo. **Click-to-call and call logging.** A PCF control or a canvas app on the contact form that initiates a Twilio Voice call from the browser, then writes a phone call activity with duration and outcome when it ends. Twilio Voice's JavaScript SDK makes the call; your control handles the Dataverse side. This is the classic light CTI pattern for Sales teams that do not have a contact centre and do not want one. ## Consent and regulation SMS is regulated more tightly than email in most jurisdictions, and the rules differ by country. Marketing messages need explicit opt-in; transactional messages are usually permitted but must offer a way to stop; sending windows are restricted in some places. Twilio enforces some of this through its messaging service compliance features and through registration requirements for sender IDs and short codes, which take time to obtain and should be started early in the project. Dynamics 365 must hold the consent state and honour it. A contact's SMS consent is a field, the send flow checks it, and a STOP reply updates it. Customer Insights - Journeys has its own consent model for SMS; if it is in use, it should own the consent record and everything else should read from it. ## Cost control Every message costs money and a runaway flow can send thousands. Put a daily send limit in the function or the flow, alert when it is approached, and never trigger a send from a bulk data update without a filter that excludes records touched by the update itself. ## What breaks in practice Numbers stored in Dataverse in inconsistent formats, so half the sends fail; normalise to E.164 on save. Replies from a number that matches several contacts. Sender registration that was not started early enough, so go-live sends from an unregistered number and gets filtered. Twilio credentials in a flow's action rather than a connection or Key Vault; see [Dataverse secrets and Key Vault](https://www.solvingdynamics365.com/guides/dataverse-secrets-and-key-vault-integration). ## Stability verdict Twilio's API is as stable as any in this space, and the Customer Service channel integration is supported and maintained by Microsoft. The flow-based notification pattern is stable at low volume and should become a function at high volume. The parts that move are regulatory: sender registration rules and consent requirements change, and the integration needs an owner who tracks them. --- # Integrating Dynamics 365 with Zapier and Make Where Zapier and Make (formerly Integromat) fit next to Power Automate for Dynamics 365 — the honest cases for each, the governance problems. Source: https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-zapier-and-make Section: Integrations / Architecture patterns Published: 2026-09-02 Zapier and Make exist in the same space as Power Automate: connect a trigger in one SaaS product to actions in others, without code. Both have Dynamics 365 and Dataverse connectors. Both are used, sometimes heavily, by teams that also run Dynamics 365. The question a consultant gets asked is whether that is a problem, and the honest answer is that it depends entirely on why the team reached for them and what the automation touches. ## Why teams pick them over Power Automate **They already use them.** A marketing or operations team with fifty Zaps connecting their web forms, ad platforms, and spreadsheets is not going to rebuild those in Power Automate because the company bought Dynamics 365. Adding a Dynamics 365 step to an existing Zap is the path of least resistance. **Connector coverage.** Zapier in particular connects to thousands of niche SaaS tools that Power Automate does not have connectors for. If the integration is "when a booking is made in a small scheduling tool, create a lead", Zapier may be the only no-code option. **Make's visual model.** Make's scenario builder, with its iterators, routers, and data stores, is more expressive than Power Automate's designer for branching and array handling, and some builders simply prefer it. **No Power Platform licensing conversation.** A Zapier plan is a credit card decision. Premium Power Automate connectors and per-flow plans involve the licensing team. None of those are bad reasons. All of them are reasons that lead to automations nobody in IT knows about. ## Why Power Automate is usually the right answer for Dynamics 365 Power Automate is inside the security and governance boundary. It authenticates to Dataverse as the user or a service principal under conditional access, its flows live in solutions and move through environments with ALM, DLP policies govern what it can connect to, and Managed Environments give administrators visibility. The Dataverse trigger is native and fires on the change, not on a polling interval. See [Power Automate connectors for Dynamics 365](https://www.solvingdynamics365.com/guides/power-automate-connectors-for-dynamics-365) and [DLP policies in Power Platform](https://www.solvingdynamics365.com/guides/dlp-policies-in-power-platform). Zapier and Make sit outside that boundary. Their Dynamics 365 connectors authenticate with a user's credentials or an app registration, and from Dataverse's point of view the automation is just an external client calling the API. Whatever that identity can do, the Zap can do. There is no DLP, no solution, and no environment promotion; a Zap built against production is a Zap built against production. For any automation that writes to Dynamics 365 in a way that matters (creates records, updates status, moves money), Power Automate should be the default, and the burden of proof is on the alternative. ## The honest cases for Zapier or Make - **Inbound lead capture from tools without Power Automate connectors.** A web form, a webinar platform, a review site. The Zap creates a lead; nothing more. Low risk, high convenience. - **Outbound notifications to tools the organisation lives in.** Post to a Slack channel when a deal closes. Add a row to a Google Sheet that a partner reads. Read-only from Dynamics 365, and harmless. - **Prototypes.** Proving that an integration is worth building, before building it properly. - **Small organisations with no Power Platform administrator.** If nobody is going to govern Power Automate either, the governance argument is weaker, and the team should use the tool it can operate. ## The cases where they are wrong Anything bidirectional. Anything that updates a record other than by creating it. Anything triggered by a Dynamics 365 change, because both tools poll the API on an interval and will eat API request allowances while adding latency. Anything with personal data leaving the tenant to a third-party platform that legal has not reviewed. Anything the business would notice if it silently stopped. ## Governance patterns that work If the tools are in use and are staying, treat them as external integrations rather than as automation platforms. Give them a dedicated application user with a minimal security role rather than a person's credentials, so that access can be scoped and revoked and so that audit logs show the automation rather than the employee. Inventory the Zaps and scenarios that touch Dynamics 365. Require that anything beyond lead capture and notifications is rebuilt in Power Automate or Azure. Review the inventory quarterly. The identity point is the important one. A Zap running as the sales director's login has the sales director's rights, and it will keep them until someone remembers it exists. ## Migration when it is time Moving a Zap into Power Automate is usually straightforward because Zaps are simple by construction. Make scenarios with iterators and routers map to Apply to each and Condition or Switch actions, and the data store concept maps to a Dataverse table. The work is finding all of them and understanding what they actually do, which is why the inventory matters. ## Stability verdict Both platforms are stable products, and their Dynamics 365 connectors work. The instability is organisational: automations outside the tenant's governance, running on individual credentials, on polling intervals, with no promotion path. Used for the narrow cases above they are fine. Used as the integration platform for Dynamics 365 they are a liability that surfaces at the worst time. For the wider decision between platform-native and external tooling, see [Azure vs Power Platform: when to use which](https://www.solvingdynamics365.com/guides/azure-vs-power-platform-when-to-use-which). --- # Integrating Finance and Operations with Databricks How Dynamics 365 Finance and Supply Chain data reaches Azure Databricks — Synapse Link as the source, Delta Lake as the common format. Source: https://www.solvingdynamics365.com/guides/integrating-finance-and-operations-with-databricks Section: Integrations / Data movement Published: 2026-09-02 Databricks and Dynamics 365 Finance and Supply Chain Management get on better than most pairings, for one reason: Microsoft's current export mechanism for F&O writes Delta Parquet, and Delta is Databricks' native table format. The transport problem that dominates integrations with other warehouses mostly disappears. What remains is the choice of export route, the layering of the lakehouse, and the modelling of F&O's data into something analysts can use. ## The source: Synapse Link with Delta output Synapse Link for Dataverse, with F&O tables and entities selected, lands data in an ADLS Gen2 account you control. Configure it to write in Delta Lake format rather than CSV. Once it does, Databricks can mount or reference that storage and read the tables directly, with the change history handled by Delta itself. See [Azure Synapse Link for Dataverse](https://www.solvingdynamics365.com/guides/azure-synapse-link-for-dataverse) for the setup. The alternatives are weaker for Databricks: - **Link to Fabric** puts the data in OneLake. Databricks can read OneLake through its ADLS-compatible endpoint, and Fabric has been adding external table sharing, but it is a detour if Databricks is the destination. - **Export to Data Lake (legacy)** is deprecated and wrote CSV. Migrate off it. - **BYOD** to Azure SQL then a JDBC read into Databricks works and is common in older estates. It is batch, entity-shaped, and adds a database hop you do not need. New builds should go Synapse Link with Delta into your own lake. That is the whole transport design. ## Layering the lakehouse The medallion pattern fits F&O data well, and it is worth being explicit about what goes where. **Bronze** is the Synapse Link output, read as-is. Do not transform it; do not even copy it if you can avoid it. Register the Delta tables in Unity Catalog as external tables pointing at the Synapse Link container. **Silver** is where F&O becomes legible. Enum integers resolved to labels using the enum metadata Synapse Link exports alongside the tables. Financial dimension attribute value sets flattened into columns. Soft-deleted rows and change markers applied so each table is a current-state view. Legal entity (DataAreaId) and partition columns kept consistently. This layer is F&O-specific and needs someone who knows the application. **Gold** is the business models: general ledger facts by dimension, inventory on hand and transactions, sales and purchase order lines with status semantics decoded, customer and vendor dimensions. This is where the data team and the finance team argue about what "revenue" means, and it is the layer that Power BI or other tools consume. The mistake is doing silver-layer work in gold, so every report re-decodes enums, or doing gold-layer work in silver, so the current-state tables carry business logic that changes every quarter. ## Change data and deletes Synapse Link in Delta mode maintains the tables for you, but you still need to understand how updates and deletes are represented if you build any incremental process on top. Delta's change data feed can be enabled on the bronze tables so silver processing picks up only what changed. Test deletes explicitly; a warehouse that never removes cancelled sales lines will overstate everything. ## Unity Catalog and access Register the lake location as an external location in Unity Catalog and grant access through catalog permissions rather than storage keys. F&O's own security, by legal entity and role, does not carry across; rebuild row filters in Unity Catalog on the silver and gold tables where legal entity separation matters. Financial data for one company should not be visible to analysts working for another simply because both live in the same lake. ## Compute and cost Bronze reads are cheap. Silver rebuilds over large tables, particularly inventory transactions and general journal lines, are where compute costs live. Design silver as incremental from the start rather than as a nightly full rebuild that was fine in the pilot and unaffordable in year two. ## Sending results back Some teams want Databricks outputs, such as demand forecasts or customer risk scores, to return to F&O or to Dataverse. There is no reverse Synapse Link. The routes are the Data Management Framework for bulk imports into F&O (see the [DMF deep dive](https://www.solvingdynamics365.com/guides/data-management-framework-deep-dive)), the Dataverse Web API for Dataverse tables, or [Dataverse virtual tables](https://www.solvingdynamics365.com/guides/dataverse-virtual-tables) over a SQL endpoint if the data only needs to be viewed rather than stored. Keep the write-back narrow; a warehouse that writes operational data back into the ERP has become a second ERP. ## What breaks in practice Entity coverage. Not every F&O data entity is available through Synapse Link. Tables always are, so most teams model from tables and use entities where they exist. Metadata drift. New fields and new enum values arrive in the lake without ceremony. Silver notebooks that hard-code column lists break; ones that read the exported metadata do not. Latency misunderstandings. The lake is minutes behind F&O at best. A dashboard labelled "live" will be corrected loudly by the first warehouse supervisor who checks it against the mobile app. ## Stability verdict This is one of the cleaner F&O analytics integrations available today because the formats align. The risk is on the Microsoft side, where the export mechanisms have been reshuffled more than once; keep bronze thin so that if the export route changes again, silver and gold survive. Compare with [Fabric and Dynamics 365](https://www.solvingdynamics365.com/guides/microsoft-fabric-and-dynamics-365) if the organisation has not yet committed to Databricks. --- # Integrating Finance and Operations with Snowflake The realistic routes for landing Dynamics 365 Finance and Supply Chain data in Snowflake — Synapse Link and Fabric as the export layer. Source: https://www.solvingdynamics365.com/guides/integrating-finance-and-operations-with-snowflake Section: Integrations / Data movement Published: 2026-09-02 Snowflake is the enterprise data warehouse many organisations have already standardised on before they arrive at Dynamics 365 Finance and Supply Chain Management. Microsoft would prefer that your analytics lived in Fabric. The data team has a Snowflake contract, hundreds of models, and no intention of moving. So the practical question is how F&O data gets into Snowflake with the least friction, and the honest answer is that there is no direct connector and you will be assembling a pipeline from Microsoft's export mechanisms plus a transport step. ## Step one: get the data out of F&O F&O does not expose its database for direct querying in the cloud. Every route starts with one of Microsoft's export mechanisms, and the choice among them has been changing over the last few years. **Synapse Link for Dataverse with F&O tables and entities.** The current strategic route. F&O tables and data entities are made available through Dataverse and land as Delta Parquet in an Azure Data Lake Storage Gen2 account you own, refreshed continuously. This is what Microsoft wants you to use and the one that will keep receiving investment. See [Azure Synapse Link for Dataverse](https://www.solvingdynamics365.com/guides/azure-synapse-link-for-dataverse). **Link to Microsoft Fabric.** The same underlying mechanism landing in OneLake instead of your own storage account, with no copy of the data. Excellent if Fabric is your warehouse; less useful as a stepping stone to Snowflake, although OneLake can be read externally as ADLS-compatible storage. **Export to Data Lake (legacy).** The older F&O feature that wrote CSV to a data lake. Deprecated in favour of Synapse Link. If you are on it, plan the move; do not build new Snowflake pipelines on it. Our [data lake export for Finance](https://www.solvingdynamics365.com/guides/data-lake-export-for-dynamics-365-finance) guide covers the history. **BYOD (bring your own database).** Data entities exported to an Azure SQL database on a schedule. Still works, still supported, and still the route many existing Snowflake integrations use because it produces clean entity-shaped tables. Batch-only, entity-only, and the export jobs need babysitting. **Data entities over OData.** Fine for small reference tables. Not a bulk route. For a new build in 2026, Synapse Link to your own ADLS Gen2 is the default. BYOD is the pragmatic choice if your team already runs it and needs entity shapes rather than raw tables. ## Step two: move it into Snowflake From ADLS Gen2, there are two sensible transports. **Snowflake's own external stages and Snowpipe.** Snowflake can read directly from ADLS Gen2 through an external stage using a storage integration. Point it at the Synapse Link output, define external tables or use Snowpipe for continuous loading of the Parquet files, and the data team stays inside tools they know. This is the lowest-moving-parts option. **Azure Data Factory or Synapse pipelines.** ADF has a native Snowflake connector and can orchestrate incremental copies, apply light transformation, and handle the change-data-capture folders Synapse Link produces. Use it when the data team wants Microsoft-side orchestration or when the load needs logic beyond "copy the files". See [Azure Data Factory with Dynamics 365](https://www.solvingdynamics365.com/guides/azure-data-factory-with-dynamics-365). Either way, treat the lake as the handover point. F&O writes to the lake; Snowflake reads from the lake; nobody writes a pipeline that talks to F&O directly. ## The modelling work is the real cost F&O tables are not analyst-friendly. Enum values arrive as integers, financial dimensions are stored in a normalised structure that needs joining through dimension attribute value sets, and the general journal, inventory transactions, and sales line tables have semantics that take a functional consultant to explain. Data entities are shaped better but are not universally available in Synapse Link and carry their own quirks. Budget for a Snowflake modelling layer, typically in dbt, that turns raw F&O tables into the ledger, inventory, and sales facts the business actually wants. The transport takes weeks; the modelling takes months, and it is the part that requires someone who understands F&O, not just SQL. ## Incremental loads and deletes Synapse Link produces change folders with insert, update, and delete markers. Your Snowflake load needs to apply deletes, not just append, or the warehouse will slowly diverge from F&O. Merge statements keyed on RecId per table are the standard approach. Test the delete path deliberately; it is the one people skip. ## Security and residency The lake account sits in your Azure subscription, so residency follows your storage region. Snowflake reads through a storage integration scoped to that container. Row-level security from F&O does not travel with the data; whatever access rules F&O enforced by legal entity or role need re-implementing in Snowflake. Financial data leaving F&O for a warehouse is a compliance conversation, not just an engineering one. ## What breaks in practice Schema changes. A new field on an F&O table appears in the lake; the Snowflake external table does not know about it until someone updates the definition. Automate schema drift detection or you will be surprised at quarter end. Entity availability. Not every data entity is enabled for Synapse Link, and some require configuration on the F&O side. Confirm your list before promising the data team anything. Latency expectations. "Near real time" from Synapse Link means minutes for tables and longer for entities. If someone wants a live inventory position, the warehouse is the wrong place to get it. ## Stability verdict The pipeline is stable once built: Microsoft export to a lake you own, Snowflake reading from that lake. The parts that move are Microsoft's export mechanisms, which have been reshuffled more than once, so keep the transport layer thin and replaceable. If you have a genuine choice of warehouse, [Fabric with Dynamics 365](https://www.solvingdynamics365.com/guides/microsoft-fabric-and-dynamics-365) removes the transport step entirely, but nobody should switch warehouses to avoid one pipeline. --- # Integration patterns for Dynamics 365 CRM The standard integration patterns for CRM-side Dynamics 365 — webhooks, Dataverse plug-ins, Service Bus integration, virtual tables, and pull vs push. Source: https://www.solvingdynamics365.com/guides/integration-patterns-for-dynamics-365-crm Section: Integrations / Architecture patterns Published: 2026-05-01 ### Key facts - Webhooks give Dataverse a lightweight outbound HTTP POST on record changes but only retry a few immediate times, so the consumer needs to stay highly available; Azure Service Bus instead retains the message until consumed, resilient to consumer outages. - Server-side plug-ins run synchronously or asynchronously against Dataverse events and can call an external service inside the transaction and roll back on failure, but slow external calls inside a plug-in cause timeouts. - Virtual tables read and write external-system data inside Dataverse apps on demand without replicating it, such as surfacing F&O customer data inside a Sales account. - Synapse Link continuously replicates Dataverse changes to OneLake for analytics and read-only downstream consumers at scale, distinct from Azure Data Factory or Synapse pipelines used for bulk, scheduled data movement. - As a general rule, push beats pull at scale, asynchronous beats synchronous when timing isn't critical, and flows beat plug-ins for multi-step orchestration while plug-ins beat flows for transactional concerns. CRM-side Dynamics 365 apps share the same Dataverse-based integration surface. A small number of well-defined patterns cover essentially every integration scenario; choosing well is the difference between integrations that age gracefully and ones that need rebuilding every two years. ## Pattern 1: Webhooks and Service Bus from Dataverse Dataverse can publish row changes to: - **Webhooks** — HTTP POST to a configured URL when a record is created, updated, deleted, or an action is invoked. Lightweight, but no retry beyond a few immediate attempts; the consumer must be highly available. - **Azure Service Bus** — message published to a queue or topic, retained until consumed. Resilient to consumer outages. The right pattern for **decoupled, durable, asynchronous notifications** at scale. - **Event Grid** — similar to Service Bus but lighter-weight; for fan-out to many subscribers. These are the modern, recommended outbound patterns from Dataverse. ## Pattern 2: Plug-ins **Server-side plug-ins** are C# classes registered against Dataverse events that run synchronously (before/after the operation) or asynchronously (queued). Used for **transactional integration** — calling an external service inside the transaction and rolling back if it fails. Powerful but operationally fragile — slow external calls inside plug-ins cause timeouts. Modern best practice: keep plug-ins lean, use them for validation and triggering, and offload work to flows or Functions. ## Pattern 3: Power Automate flows Triggered by Dataverse events through the Dataverse connector. Right for **business orchestration with multiple steps and human approval**. Easier to maintain than plug-ins; less powerful (no transactional context with Dataverse). Use flows when the work isn't strictly part of the originating transaction. ## Pattern 4: Virtual tables Read-and-write surfaces in Dataverse that pull data from external systems on-demand without storing it. The right pattern for **reading external data inside Dataverse apps** without replicating — e.g. surfacing F&O customer data inside a Sales account. ## Pattern 5: Pull integration via API External system polls the Dataverse API on a schedule. Simple, but inefficient at scale and slow to react. Use when the external system can't accept pushes. ## Pattern 6: Bulk via Data Factory For **bulk movement** — initial loads, daily extracts, archive — Azure Data Factory or Synapse pipelines using the Dataverse connector. ## Pattern 7: Synapse Link to OneLake Continuous replication of Dataverse changes to OneLake, where analytics and downstream systems consume. The right pattern for analytics and read-only consumers at scale. ## Choosing Push beats pull at scale. Asynchronous beats synchronous when timing isn't critical. Service Bus / Event Grid beat webhooks for resilience. Flows beat plug-ins for orchestration; plug-ins beat flows for transactional concerns. Document the pattern per integration up front. In practice, most of these patterns end up wired to one of a small set of common third-party SaaS products — e-signature ([DocuSign and Adobe Sign](https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-docusign-and-adobe-sign)), marketing ([HubSpot](https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-hubspot), [Mailchimp and SendGrid](https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-mailchimp-and-sendgrid)), payments ([Stripe and PayPal](https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-stripe-and-paypal)), and communications ([Twilio](https://www.solvingdynamics365.com/guides/integrating-dynamics-365-with-twilio)) — each with its own guide covering the specific connector or webhook shape. ## Where to go next Each pattern has a deeper guide: [webhooks vs events](https://www.solvingdynamics365.com/guides/webhooks-vs-events-in-dataverse), [Service Bus integration](https://www.solvingdynamics365.com/guides/azure-service-bus-integration-with-dataverse), [plug-ins vs Power Automate](https://www.solvingdynamics365.com/guides/integrating-with-dataverse-plug-ins-vs-power-automate), and [virtual tables](https://www.solvingdynamics365.com/guides/dataverse-virtual-tables). The two cross-cutting disciplines are [idempotency](https://www.solvingdynamics365.com/guides/idempotency-in-dynamics-365-integrations) and [polling vs push](https://www.solvingdynamics365.com/guides/polling-vs-push-patterns-for-dynamics-365). At the architecture level above these individual patterns sit [event-driven architecture](https://www.solvingdynamics365.com/guides/event-driven-architecture-for-dynamics-365), [anti-corruption layers](https://www.solvingdynamics365.com/guides/anti-corruption-layers-with-dynamics-365) for protecting Dynamics 365 from an external system's model leaking in, and the protocol choice itself in [SOAP vs REST vs GraphQL](https://www.solvingdynamics365.com/guides/soap-vs-rest-vs-graphql-for-dynamics-365). --- # Integration testing patterns for Dynamics 365 How to test integrations for Dynamics 365 — unit, contract, integration, end-to-end tests, and the patterns that catch regressions before production. Source: https://www.solvingdynamics365.com/guides/integration-testing-patterns-for-dynamics-365 Section: Integrations / Resilience & ops Published: 2026-05-01 An untested integration is a future incident. Dynamics 365 integrations are particularly vulnerable: multiple systems, complex business rules, evolving schemas. **Integration testing** is the discipline that catches problems before users do. Mature operations have multi-layer test strategies; immature ones discover issues in production. **Testing pyramid.** - **Unit tests** — fast, narrow, isolated. - **Contract tests** — interface compliance. - **Integration tests** — multi-component, real dependencies. - **End-to-end tests** — full system, real systems. Each layer catches different defects; balance speed and coverage. **Unit tests for integration code.** - Test individual functions / classes. - Mock external dependencies. - Fast execution. - Run on every commit. Catch logic bugs before reaching anything external. **Mocking external systems.** - **Mock Dataverse API** — for testing logic. - **Mock external systems** — assumed responses. - **Test doubles** for asynchronous calls. Pros: fast, isolated. Cons: assumes mock matches reality; gaps possible. ## Contract testing Verify interface compliance: - **Consumer-driven** — consumer specifies expected interface. - **Provider verifies** they meet the contract. - Catches breaking changes early. Tools: Pact, Spring Cloud Contract. Less common in Dynamics world; the concept is useful. **Integration tests.** - Multiple components together. - Real or test-environment dependencies. - Slower than unit; faster than full e2e. - Specific scenarios. Catch bugs in component interaction. **End-to-end tests.** - Full system stack. - Real Dynamics environment (test instance). - Real external systems (test environments). - Slowest; full-coverage scenarios. Catch system-level issues; can't catch interaction logic bugs (that's integration test job). **Test environment strategy.** - **Dev sandboxes** — for development. - **Test environments** — for integration testing. - **UAT environments** — production-like. - **Production-like staging** — final pre-production validation. Each level has different fidelity to production. ## Test data management Critical: - **Synthetic data** — generated. - **Anonymised production data** — realistic but safe. - **Curated test datasets** — covering specific scenarios. Test data freshness affects test reliability. **Test cases for integrations.** - **Happy path** — primary flow. - **Edge cases** — boundary conditions. - **Failure modes** — error handling. - **Idempotency** — duplicate processing. - **Concurrency** — parallel operations. - **Performance** — load behaviour. - **Schema evolution** — backward compatibility. Each warrants test coverage. **Asynchronous integration testing.** - **Trigger** the action. - **Wait** for asynchronous completion. - **Assert** end state. - **Timeout** if too slow. The wait is challenging; polling vs callback; timeout balance. **Test isolation.** - Each test isolated from others. - Setup test data per test. - Cleanup after. Without isolation, test order matters; flaky tests. **Test naming and organisation.** - **Behaviour-driven** names — `Should_create_order_when_valid_quote`. - **Grouped by feature.** - **Tagged** for filtering (smoke, regression, etc.). Readable test names enable maintenance and debugging. **Continuous testing.** - **CI runs unit + fast integration** on every commit. - **Nightly runs e2e** suite. - **Pre-deployment runs** full regression. - **Smoke tests** post-deployment to verify health. Each cadence different. **Performance testing.** - **Load test** — sustained load. - **Stress test** — pushing limits. - **Spike test** — sudden burst. - **Soak test** — extended duration. For integrations expected to handle volume, performance testing essential. **Tools.** - **xUnit, NUnit, MSTest** — .NET unit testing. - **Specflow** — BDD-style. - **Postman / Newman** — API testing. - **K6, JMeter** — performance. - **Power Apps Test Engine** — for canvas apps. - **Custom test harness** for Dynamics-specific. Each has place; toolchain depends on team. ## Test code as production code Test quality matters: - Readable. - Maintainable. - Reliable (not flaky). - Documented. Flaky tests get ignored; bad tests worse than no tests. **Flaky test handling.** - Identify flaky tests. - Investigate root cause (timing, isolation, data). - Fix or remove. - Don't tolerate flakiness — it erodes trust in test suite. **Schema evolution testing.** - **Forward compatibility** — new data format readable by old consumer. - **Backward compatibility** — old data readable by new consumer. Both essential for integrations that evolve. ## Negative testing What happens when things go wrong: - Invalid data input. - Network failure. - Downstream unavailable. - Schema mismatch. Negative tests catch reliability bugs; often more valuable than positive. **Test environments and CI/CD integration.** - **Pipeline triggers tests automatically.** - **Test results gate** deployment. - **Failed tests block** progression. Tests as quality gate. **Common pitfalls.** - **No integration tests.** Bugs found in production. - **Tests only happy path.** Edge cases hit users first. - **Flaky tests tolerated.** Trust in suite erodes. - **Test environments unrepresentative.** Tests pass; production fails. - **No performance testing.** Production load surprises. - **Tests skip when slow.** Convenience over rigour. - **Test data leaks.** Production data in test environments; compliance issue. **Coverage targets.** - **Code coverage 60-80%** typical for production code. - **Critical paths 100%.** - **Less critical** lower. Coverage isn't quality alone; thoughtful tests beat high coverage with shallow tests. ## Mutation testing Advanced: - Introduce small code changes (mutations). - Run tests. - Tests should fail (catch the mutation). - Tests that don't catch mutations are weak. Reveals weak tests. ## Strategic positioning Integration testing is investment in reliability. Mature operations have multi-layer test strategies; immature ones discover issues in production. The investment pays back through fewer production incidents, faster feature delivery, and confident deployments. For architects: - Build test strategy from start. - Layer tests appropriately. - Maintain test environments. - Integrate with CI/CD. - Treat tests as production code. The teams that test rigorously ship reliably; the teams that don't ship anxiously. The difference is testing discipline; the cost is engineering time; the benefit is operational confidence. --- # Logic Apps Standard vs Consumption The two Logic Apps hosting models — Standard (single-tenant) vs Consumption (multi-tenant) — and how to choose between them for Dynamics 365 integrations. Source: https://www.solvingdynamics365.com/guides/logic-apps-standard-vs-consumption Section: Integrations / Azure services Published: 2026-05-03 **Azure Logic Apps** is Microsoft's iPaaS-grade orchestration platform, used heavily for Dynamics 365 integrations. It ships in two distinct hosting models — **Consumption** (the original, multi-tenant, pay-per-execution) and **Standard** (newer, single-tenant, App Service-hosted). Choosing the right one matters; the trade-offs are real. ## Consumption Logic Apps The original model, in market since 2016: - **Multi-tenant** — workflows run on Microsoft's shared compute infrastructure. - **Pay-per-execution** — billed per action execution. No standing charges; pay only what runs. - **Auto-scale** — runs on Microsoft's elastic infrastructure; no capacity to manage. - **Single workflow per Logic App resource** — each Logic App is one workflow. - **Trigger limitations** — some triggers (especially long-polling) have constraints. - **Connectors** — wide library, both standard and premium. - **Cold start** — first execution after idle period has small latency. - **Designer-friendly** — Azure portal designer is rich and stable. Strong fit for: low-to-moderate volume integrations, business-process orchestrations, simple workflows, prototypes. ## Standard Logic Apps Newer model, launched 2021: - **Single-tenant** — workflows run on dedicated Azure App Service infrastructure under your control. - **Predictable cost** — fixed App Service plan cost; workflow executions don't bill per-action. - **Multiple workflows per Logic App resource** — group related workflows into one resource. - **VNET integration** — run inside an Azure VNET for private networking to on-premise systems. - **Local development** — Visual Studio Code extension runs Logic Apps locally; full source-control friendly. - **No cold start** — App Service stays warm. - **Stateful and stateless workflows** — choose per workflow whether to persist state (durable) or run stateless (faster, no recovery). - **More complex deployment** — App Service plan to manage; deployment slots; scaling rules. Strong fit for: high-volume integrations (cost predictability matters), enterprise integration patterns, VNET-required scenarios, source-controlled enterprise workflows. **Cost comparison.** - **Consumption** — generous free tier; pay per action. At low volume, very cheap. At high volume (millions of actions per month), costs add up substantially. - **Standard** — fixed monthly cost for the App Service plan (typically a few hundred dollars per month for a small plan), regardless of execution count. Cost-effective at scale; over-priced for low-volume. The break-even point varies by workflow complexity but is typically around hundreds of thousands of action executions per month. ## Feature parity Standard has caught up substantially but some differences remain: - **Some triggers and connectors** are Consumption-only or have different behaviour. - **Designer feature gaps** — both designers have evolved; check current docs. - **Integration patterns** — some advanced patterns (built-in messaging, durable orchestrations) work differently. **Deployment.** - **Consumption** — deploy via ARM templates, Azure CLI, the portal. Simple. - **Standard** — deploy via Azure DevOps / GitHub Actions pipelines, source-controlled with the workflow JSON files. More setup; more rigour. For ALM-disciplined teams, Standard's source-control story is a significant advantage. ## Mixing both A typical enterprise has both: - **Standard Logic Apps** for the integration backbone — high-volume, source-controlled, VNET-isolated. - **Consumption Logic Apps** for ad-hoc business workflows, occasional triggers, prototypes that may or may not become production. The two interoperate cleanly — a Consumption workflow can trigger a Standard workflow and vice versa via standard mechanisms. **Choosing for Dynamics 365 integrations.** Use **Consumption** when: - Volume is low to moderate. - Workflows are simple, business-oriented. - Cost-per-execution is fine. - Quick to build, easy to maintain. Use **Standard** when: - Volume is high; predictable cost matters. - Source control and CI/CD are mandatory. - VNET access to private resources is required. - Multiple related workflows benefit from grouping. - Enterprise-grade governance is needed. ## Comparison with Power Automate Power Automate (covered in earlier guides) is yet another option — even more business-user-friendly than Consumption Logic Apps, with per-user licensing instead of per-execution. The general decision tree: - Citizen developer, business workflow → Power Automate. - IT-managed integration, moderate scale → Consumption Logic Apps. - IT-managed integration, high scale or enterprise governance → Standard Logic Apps. - Heavy custom code → Azure Functions. ## Operational reality Most Dynamics 365 customers use Power Automate for the bulk of work; reach for Logic Apps when Power Automate's governance, cost, or scale models don't fit. Within Logic Apps, choose Standard for serious integrations and Consumption for everything else. ### Frequently asked questions **What is the difference between Consumption and Standard Logic Apps?** Consumption is multi-tenant, pay-per-action, one workflow per resource, auto-scaled by Microsoft. Standard runs single-tenant on an App Service plan with fixed monthly cost, multiple workflows per resource, VNET integration, local development in VS Code, and stateful or stateless workflows. **When does Standard become cheaper?** Around hundreds of thousands of action executions per month, depending on workflow complexity. Below that, Consumption's pay-per-action is very cheap; above it, the fixed App Service plan wins. **Which should I use for Dynamics 365 integrations?** Standard for the high-volume, source-controlled, VNET-isolated integration backbone; Consumption for ad-hoc business workflows and prototypes. Power Automate remains the default for citizen-developer business workflows, and Azure Functions for heavy custom code. **Can the two models work together?** Yes. A Consumption workflow can trigger a Standard workflow and vice versa through standard mechanisms, and most enterprises run both. --- # Logic Apps with Dynamics 365 How Azure Logic Apps complement Power Automate for Dynamics 365 integrations — when to choose which, hybrid patterns, and operational realities. Source: https://www.solvingdynamics365.com/guides/logic-apps-with-dynamics-365 Section: Integrations / Azure services Published: 2026-05-01 **Azure Logic Apps** and **Power Automate** are both Microsoft's workflow orchestration platforms — and they overlap substantially. Both run on the same engine, use the same connectors, and let you build flows with similar designers. The boundary between them is more about *audience and operational model* than capability. Dynamics 365 implementations typically end up using both, deliberately. ## The same engine, different surfaces Logic Apps and Power Automate cloud flows compile to the same underlying Azure-hosted workflow runtime. They share the same connectors for Dataverse, Business Central, F&O, and hundreds of other services. The differences are around packaging, governance, and operating model. **Power Automate is for the citizen and pro maker.** Built into the Power Platform admin and maker portals. Flows live in environments alongside Power Apps and Dataverse. Licensing is per-user or per-flow. Designed for makers — business analysts, citizen developers, power users — to build workflow automation without filing a ticket with IT. Strong fit for: business-process automation, approvals, lightweight integrations, in-product workflow. ## Logic Apps is for the IT-managed integration estate Lives in Azure subscriptions, managed alongside Functions, Service Bus, Event Grid, and the rest of an IT estate. Source-controlled in ARM/Bicep templates, deployed by DevOps pipelines, monitored through Azure Monitor. Licensing is per-execution and per-action (no user licenses). Designed for IT to run as production infrastructure. Strong fit for: enterprise integrations, high-volume processing, cross-system orchestration with strict SLAs, B2B with trading partners. **When to choose Power Automate.** - The workflow has a strong relationship to a specific user or department. - The Dataverse-related licensing is already in place. - Maker autonomy (low-code, low IT involvement) is the goal. - The workflow lives logically alongside Power Apps in the same environment. - Low-to-moderate volume. **When to choose Logic Apps.** - High volume (thousands of executions per hour) — Logic Apps scales differently and is often more economical. - Strict SLA, monitoring, alerting requirements. - Source-control and DevOps governance matter. - Integration with non-Power-Platform Azure services (Service Bus, Event Grid, Functions, API Management) is central. - The workflow lives in IT's domain, not a business unit's. ## Hybrid patterns Most large Dynamics 365 implementations have both: - **Power Automate flows** for in-product user-driven automation (approvals, lead scoring follow-up, notification fan-out). - **Logic Apps** for the integration backbone (trading-partner EDI, large-volume sync, cross-system orchestration). The two cohabit cleanly. Logic Apps can trigger Power Automate flows; Power Automate flows can trigger Logic Apps. Pick the host that matches the workflow's nature. ## Operational reality — Power Automate Easier to build, harder to govern at scale. Flows proliferate when every team can build their own. DLP policies, environment isolation, and lifecycle (managed solutions) are essential discipline. ## Operational reality — Logic Apps Harder to build (more developer-flavoured), easier to govern (ARM templates, Azure RBAC, Azure Monitor). Cost predictability is better at scale. Requires Azure skills on the team. ## The connector overlap Both call the same Dataverse, BC, and F&O connectors. The same throttling limits apply per tenant. So the *Dynamics 365 side* doesn't care which host you choose; the choice is about your team's preferred operating model. ## Common pitfall Building a high-volume integration in Power Automate where Logic Apps would scale and govern better. Migrate to Logic Apps before the cost or complexity bites. --- # Message replay and poison queue handling for D365 How to design Dynamics 365 integrations that survive transient failures and handle poison messages — dead-letter queues, replay tooling, idempotency. Source: https://www.solvingdynamics365.com/guides/message-replay-and-poison-queue-handling-for-d365 Section: Integrations / Eventing & messaging Published: 2026-05-01 Every integration eventually fails — receiver down, payload malformed, downstream system busy. A robust Dynamics 365 integration architecture handles these failures gracefully: failures isolated, messages retried, poison messages quarantined for human review, and replay machinery for restoring sync. Without it, transient failures cascade into data divergence and operational scrambling. **Failure modes.** - **Transient** — temporary network issue, brief downstream slowness, momentary rate limit. Retry succeeds. - **Persistent** — receiver down for hours, schema mismatch, authentication expired. Retry continues to fail. - **Poison** — message data malformed in a way that no retry will help. Each requires a different response. **Retry strategies.** - **Fixed delay retry** — fixed N seconds between attempts. - **Exponential backoff** — delay doubles each attempt. - **Exponential with jitter** — backoff with random variance to prevent thundering herd. - **Bounded retry count** — give up after N attempts. Exponential with jitter is the modern default; bounded count prevents infinite loops. ## Dead-letter queues (DLQ) When retries exhaust, the message goes to a dead-letter queue: - **Azure Service Bus** — dead-letter subqueue per queue/topic. - **Azure Event Grid** — dead-letter to a blob storage container. - **Azure Storage Queue** — separate "poison" queue. - **Webhook** — no dead-letter; message lost. For critical integrations, never use webhooks alone — the lack of DLQ is operationally unacceptable. **DLQ inspection.** - **Service Bus Explorer** — see messages in DLQ, inspect content. - **Azure CLI / PowerShell** — programmatic access. - **Custom DLQ dashboard** — Power BI report over DLQ metrics. Without inspection, messages pile up unseen. **Resubmission from DLQ.** - **Manual** — operator inspects, fixes issue, resubmits message to main queue. - **Automated** — DLQ processor with logic to retry messages whose conditions have cleared. - **Bulk resubmit** — after an outage, resubmit all DLQ messages. The choice depends on volume and judgment requirements. For small volumes, manual is fine; for high volumes, automation needed with safeguards. ## Idempotency A foundational requirement. Receivers must handle the same message multiple times: - **Idempotency key** — unique per business event. - **Deduplication at receiver** — check if already processed; skip if so. - **State-based logic** — set state to X, don't increment counter twice. Without idempotency, retries cause data corruption. Build idempotency into every receiver from day one. **Idempotency keys.** - **Business event ID** — order ID, invoice number. - **Source-system primary key** — record ID from external system. - **Composite key** — combination of source ID and operation. The key should be deterministic — same business event always produces same key, regardless of how many times the message is sent. ## Message correlation For complex flows: - **Correlation ID** — identifies a multi-message conversation. - **Sequence number** — orders messages within a conversation. - **Saga ID** — identifies a longer-running process. When something goes wrong, correlation lets you reconstruct the conversation. ## Outbox pattern A specific reliability pattern: - Application writes to local DB transaction AND outbox table. - Separate process reads outbox and publishes to messaging. - Even if messaging is down, outbox holds the messages until published. For Dynamics 365 plug-ins emitting external events, an outbox table in Dataverse + a worker reading it is a reliable pattern. ## Inbox pattern The receiver's mirror: - Receiver writes message to local inbox table on receipt. - Processing logic checks inbox before acting. - Idempotency via inbox deduplication. Outbox + inbox = at-least-once delivery with deduplication = exactly-once business outcome. ## Schema versioning Messages have schemas that change: - **Backward compatible** — add fields; old consumers ignore them. - **Forward compatible** — handle missing fields gracefully. - **Breaking change** — version the message type. Most integrations should aim for backward compatibility; breaking changes need coordinated deployment. ## Poison message identification Distinguishing poison from transient is hard: - **Persistent failure across retries with same error** — likely poison. - **Same error across multiple messages** — likely systemic issue, not poison. - **Manual review** — operator looks at the message, identifies the problem. DLQ inspection workflow includes triage to categorise messages. **Replay tooling.** - **Replay from DLQ** — resubmit individual messages. - **Replay from event store** — for Event Hub or storage-backed events, replay from a timestamp. - **Source system replay** — re-extract and re-emit from the source. For long-running outages, replaying from source is sometimes the only practical recovery. **Monitoring and alerting.** - **DLQ depth** — alert when DLQ has messages older than N hours. - **Retry rate** — high retry rate signals systemic issue. - **End-to-end latency** — track from source emission to destination processing. - **Failed plug-in executions** — Dataverse async job failures. Without monitoring, integration health is invisible until something breaks user-visibly. **Common pitfalls.** - **No idempotency.** Retries cause duplicates; data corruption. - **No DLQ.** Failed messages disappear; integration silently incomplete. - **DLQ ignored.** Messages pile up; no one reviews; eventual cleanup loses business data. - **Schema drift.** Sender updates schema; receivers break; cascade of failures. - **No replay capability.** Outage recovery requires manual data backfill. - **Optimistic retry counts.** Retries forever; resource leak. **Operational rhythm.** - **Daily** — DLQ depth check. - **Weekly** — DLQ message triage; resubmit or discard. - **Monthly** — review monitoring alerts and patterns; improve resilience. - **After incidents** — postmortem; improvements deployed. ## Strategic positioning Integration reliability is engineering discipline, not a feature. The architectural patterns — at-least-once delivery, idempotency, DLQ, replay — apply across messaging platforms and integration scenarios. Get them right once; reuse across integrations. The teams that invest in reliable integration architecture have boring integration days; the teams that don't have constant fire drills. The investment is small relative to ongoing operational cost; the savings compound. --- # Microsoft Fabric and Dynamics 365 How Microsoft Fabric and OneLake change Dynamics 365 analytics — Synapse Link, lakehouses, and the migration from Export to Data Lake. Source: https://www.solvingdynamics365.com/guides/microsoft-fabric-and-dynamics-365 Section: Integrations / Azure services Published: 2026-05-01 Updated: 2026-09-06 ### Key facts - Synapse Link for F&O replaces the older Export to Data Lake feature and the Bring Your Own Database pattern, both of which Microsoft is deprecating in favour of the OneLake/Delta-Parquet shape. - DirectLake reads parquet directly from OneLake without an import or DirectQuery step, giving performance close to an import model with no refresh schedules. - Fabric capacity is billed in F-SKUs by compute-seconds consumed across every workload sharing that capacity — lakehouse ingestion, notebook runs, DirectLake queries, and Power BI refreshes all draw from the same pool, unlike classic Power BI Premium where BI was the only consumer. - Migrating off Export to Data Lake or BYOD needs its own testing cycle rather than a flag flip, since semantic models built on the old schema typically need rebuilding against the new shape, with both pipes run in parallel for at least one full reporting cycle before the legacy one is decommissioned. - The recommended first move for most customers is turning on Synapse Link for whichever app holds the data a specific report needs, not an all-at-once Fabric migration. **Microsoft Fabric** is Microsoft's unified analytics platform — a single SaaS product covering lakehouse, data warehouse, real-time analytics, data science, and Power BI on top of a shared storage layer called **OneLake**. For Dynamics 365 customers, Fabric is becoming the destination for analytics that need cross-system data, large historical volumes, or complex transformations beyond what Power BI's own model can handle. ## Synapse Link for Dataverse A managed near-real-time pipe from Dataverse into a Fabric lakehouse (or, historically, a customer-owned Azure Data Lake). When enabled per environment, Dataverse continuously writes Delta-Parquet snapshots of selected tables to OneLake. Downstream Fabric workloads — notebooks, SQL endpoints, Power BI semantic models — read from OneLake without touching Dataverse. ## Synapse Link for F&O The equivalent for Finance and Supply Chain. Data entities or specific tables stream into OneLake. Replaces the older **Export to Data Lake** feature in F&O and the **Bring Your Own Database (BYOD)** pattern, both of which Microsoft is deprecating. ## Business Central data lake export Business Central also publishes its data into Fabric via a similar mechanism (still evolving as a generally-available feature). The end state is a single OneLake estate containing CRM (Dataverse), F&O, and BC tables side by side, queryable as one logical data set. ## DirectLake A new Power BI mode that reads parquet directly from OneLake without import or DirectQuery. Performance close to import, no refresh schedules. The right pattern for most Dynamics 365 reporting at scale. **Use cases.** - **Cross-system reports.** Sales pipeline (Dataverse) joined to finance actuals (F&O) joined to web analytics (Adobe Analytics) — all in one Fabric lakehouse, with one semantic model in Power BI. - **History beyond the source.** Dataverse and F&O retain data per their own retention policies; OneLake retention is independent and cheap. - **Data science.** Train ML models against the lakehouse rather than hitting the live ERP. - **Real-time analytics.** Stream from operational events into Fabric's KQL database for dashboards. ## Operational reality Fabric capacity is sized in F-SKUs (or Power BI Premium capacity). Plan capacity for the actual workload — peak Power BI users, lakehouse compute, semantic model size. Capacity oversubscription is the most common Fabric pain point. ## Governance **Microsoft Purview** integrates with Fabric for cataloguing, classification, and lineage. Use it from day one if compliance matters. ## Choosing what feeds Fabric, and how | Source | Mechanism | Latency | Best for | |---|---|---|---| | Dataverse | Synapse Link for Dataverse | Near-real-time (minutes) | Sales, service, marketing data joined with other sources | | Finance and SCM | Synapse Link for F&O | Near-real-time | Financial and supply-chain reporting at scale, replacing BYOD | | Business Central | Data lake export | Scheduled / evolving to near-real-time | SMB customers wanting the same OneLake estate as their CRM/ERP siblings | | Any REST/OData source | Fabric Data Factory pipelines | Batch, scheduled | Third-party systems with no native Fabric connector | The right first move for most Dynamics 365 customers is Synapse Link for whichever app holds the data a specific report needs — not an all-at-once Fabric migration. Turn on the pipe for the tables a concrete reporting need requires, validate the resulting lakehouse model, then expand. ## Cost shape Fabric capacity (F-SKUs) is billed by compute-seconds consumed across every workload sharing that capacity — lakehouse ingestion, notebook runs, DirectLake queries, and Power BI refreshes all draw from the same pool. This is different from classic Power BI Premium, where BI was the only consumer. A Fabric estate that also runs notebooks and Data Factory pipelines needs capacity planning that accounts for all of them, not just the reports; teams that size capacity purely off "how many Power BI users" routinely under-provision once data engineering workloads land on the same capacity. ## Migrating off Export to Data Lake / BYOD Customers still running the legacy **Export to Data Lake** (F&O) or **Bring Your Own Database** patterns should treat the Fabric migration as a project with its own testing cycle, not a flag flip: semantic models built against the old schema (BYOD's SQL views, or Data Lake's folder structure) typically need rebuilding against the OneLake/Delta-Parquet shape, and any downstream consumer — a Power BI report, a data warehouse load, a partner integration — needs to be repointed and validated before the legacy pipe is switched off. Run both in parallel for at least one full reporting cycle before decommissioning the old export. ## Where it stops Highly specialised analytics (statistical forecasting, complex MDX cubes, certain GIS workloads) sometimes still need a separate purpose-built platform. For mainstream BI and data integration on Dynamics 365, Fabric is now the recommended home. Organisations already committed to a different lakehouse platform still commonly feed it from F&O rather than migrating wholesale — see [F&O with Databricks](https://www.solvingdynamics365.com/guides/integrating-finance-and-operations-with-databricks) and [F&O with Snowflake](https://www.solvingdynamics365.com/guides/integrating-finance-and-operations-with-snowflake) for that pattern. ## Where to go next The feeds into Fabric each have a guide: [Synapse Link for Dataverse](https://www.solvingdynamics365.com/guides/azure-synapse-link-for-dataverse), [Fabric Link for Dataverse](https://www.solvingdynamics365.com/guides/integrating-dataverse-with-microsoft-fabric-link), and [data lake export for Finance](https://www.solvingdynamics365.com/guides/data-lake-export-for-dynamics-365-finance). On top sits [Power BI for Dynamics 365](https://www.solvingdynamics365.com/guides/power-bi-for-dynamics-365). Where a lakehouse ends and a customer data platform begins is [CDP vs data warehouse](https://www.solvingdynamics365.com/guides/customer-data-platform-vs-data-warehouse). --- # Microsoft Graph and Dataverse How Microsoft Graph connects Microsoft 365 data to Dynamics 365 — Graph connectors, indexing Dataverse content, and the Copilot enablement story. Source: https://www.solvingdynamics365.com/guides/microsoft-graph-and-dataverse Section: Integrations / API & identity Published: 2026-05-01 **Microsoft Graph** is the API surface that exposes data and intelligence across Microsoft 365 — users, groups, calendars, mail, files, Teams chats, meeting recordings, and increasingly external data via **Graph connectors**. For Dynamics 365 customers, Graph is the bridge that brings Dataverse content into the broader Microsoft 365 experience — most importantly, into **Microsoft 365 Copilot**. ## The Graph data model Microsoft Graph organises Microsoft 365 data under a unified API: - **Users** — identity, profile, roles. - **Mail, calendar, contacts** — Exchange Online data. - **Files** — OneDrive and SharePoint documents. - **Teams** — chats, channels, meetings, recordings. - **Tasks** — To-Do and Planner. - **Insights** — relationships derived across data (who works with whom, what's trending). - **Search** — unified search index across the above. ## Graph connectors External data — including Dataverse — can be indexed into Microsoft Graph via **Graph connectors**. The connector pulls data on a schedule, transforms it into Graph-indexable format, and pushes it into the search index. Once indexed: - The data appears in Microsoft Search (the search box across Microsoft 365 apps). - Copilot can ground its responses on the indexed content. - The data is available across all Microsoft 365 surfaces — Outlook, Word, Teams, the Copilot pane. ## Dataverse-to-Graph indexing Microsoft ships a **Dataverse connector for Graph** that indexes selected Dataverse tables into the Graph index. Configuration: - Pick which tables to index. - Pick which columns to include. - Configure schedule (typically daily or hourly). - Set the result-display format — title, summary, URL, icon. Once configured, the indexed Dataverse content surfaces in: - **Microsoft Search results** — when a user searches in Microsoft 365, indexed Dataverse records appear alongside emails, files, Teams chats. - **Copilot grounding** — Copilot considers indexed Dataverse content when answering questions like "what's the latest on Customer X?". - **Office app surfacing** — references to indexed Dataverse records can appear in document drafting, email composition, meeting prep. ## Why this matters for Dynamics 365 Without Graph indexing, Dataverse data lives in its own silo — accessible through Dynamics 365 apps, but invisible to a user working in Outlook, Word, or asking Copilot a general question. With Graph indexing, the customer record / opportunity / case is part of the user's broader Microsoft 365 knowledge surface. **Use cases.** - **Outlook composition** — drafting an email to a customer, Copilot pulls in recent CRM activity from the Graph-indexed Dataverse content. - **Document drafting** — writing a proposal in Word, Copilot suggests content from indexed opportunity records. - **Meeting prep** — Copilot summarises what's happening with a customer ahead of a meeting, drawing on indexed Dataverse records. - **Cross-system search** — a user searches "Contoso Q3 contract" and gets the email thread, the Word doc, the OneDrive folder, and the Dataverse opportunity all in one search result. ## Beyond Dataverse — F&O and Business Central Graph connectors exist (or are planned) for indexing F&O and Business Central data too. The end state is unified Microsoft 365 search and Copilot grounding across all Dynamics 365 products. ## Security Graph indexing respects the source system's security: - Users only see indexed Dataverse content they have permission for in Dataverse. - The connector pushes data trimmed to public-or-shared records; per-user filtering happens at search-time. This is critical for sensitive data: indexing into Graph doesn't expose data to users who shouldn't see it in the source system. ## Compliance Indexed data flows through Microsoft 365 services and is subject to: - **Data residency** — Graph index resides in the tenant's region. - **Retention policies** — Microsoft Purview can apply retention to indexed content. - **Compliance certifications** — same as Microsoft 365. ## Beyond search and Copilot Microsoft Graph also exposes APIs that Dynamics 365 itself uses: - **Email tracking** through Exchange Online — server-side sync between Dataverse and Exchange uses Graph APIs. - **Calendar integration** — meeting invitations to/from Dataverse contacts. - **Teams integration** — surfacing Dataverse records in Teams via Graph-based shared experiences. **Common pitfalls.** - **Indexing too much** — indexing every Dataverse table without filtering produces noise in search results. Index curated tables and columns. - **Stale index** — connectors that haven't refreshed in days produce out-of-date search results. Monitor. - **Wrong indexing configuration** — wrong title field or wrong URL pattern makes results unusable. ## Operational reality Graph integration is increasingly the strategic direction. Configure it for at least your major Dataverse tables; the user experience improvement compounds. --- # Microsoft Graph API with Business Central How Business Central exposes data through Microsoft Graph — the new unified API surface, what's available, authentication. Source: https://www.solvingdynamics365.com/guides/graph-api-with-business-central Section: Integrations / API & identity Published: 2026-05-01 For years, Business Central had its own dedicated OData API at `api.businesscentral.dynamics.com`. With Microsoft's investment in **Microsoft Graph** as the unified API surface across Microsoft 365 and Dynamics 365, BC is being progressively surfaced through Graph too. Understanding what's where — and when to use Graph vs BC's native APIs — matters for any cross-product integration design. ## Microsoft Graph overview A single API endpoint (`graph.microsoft.com`) exposing: - M365 data — users, mail, calendar, files, Teams. - Dynamics 365 data — customers, leads, opportunities. - Security and compliance. - Identity (Entra ID). - Increasingly: Business Central data. Graph's value is unification — one auth model, one query syntax, one SDK across many sources. ## BC in Microsoft Graph As of 2026, Graph exposes a growing subset of BC entities: - Customers. - Vendors. - Items. - Sales orders. - Purchase orders. - Invoices. The list expands; check current Graph documentation for what's GA vs beta vs preview. ## BC's native APIs Continue to exist: - **Standard API v2.0** at `api.businesscentral.dynamics.com/v2.0/...` — comprehensive coverage. - **Custom APIs** — partner-defined endpoints. - **Web services** — older SOAP-style. The native API is more complete than Graph for BC; Graph is more universal across Microsoft products. **When Graph wins for BC.** - **Cross-product integrations** — pulling BC + M365 + Dynamics 365 data in one app. - **App ecosystem** — many apps already use Graph for M365. - **Unified auth** — single token covers many resources. - **Modern SDK** — Microsoft Graph SDKs in many languages. **When native API wins for BC.** - **Complete BC coverage** — niche entities not in Graph. - **Performance** — direct API is sometimes faster. - **Specific BC behaviour** — bound actions specific to BC. - **Established integrations** — already built on native API. **Authentication.** - **Graph** — Microsoft Entra ID OAuth 2.0. App registrations grant `BusinessCentral.ReadWrite.All` and other scopes. - **Native** — also Entra ID OAuth; same patterns. Both surfaces require app registration; Graph's permission scopes are less granular than BC's native API (which has per-environment, per-company scoping). ## Query patterns Graph endpoints follow standard Graph conventions: ``` GET https://graph.microsoft.com/v1.0/financials/companies/{id}/customers ``` OData filtering, paging, expand all work as with M365 endpoints. The mental model: Graph is OData with Microsoft conventions; if you know Graph for M365, BC in Graph feels familiar. **Common scenarios.** - **Pull BC customer + their M365 contact info** — single Graph app. - **Surface BC invoices in Outlook** — Outlook add-in queries Graph. - **Aggregate BC + Sales data in a custom app** — Graph for both. - **Power Automate flow touching BC and SharePoint** — Graph connectors for both. ## Webhooks via Graph Graph supports change notifications: - Subscribe to BC entity changes. - Notifications POSTed to your endpoint. - Up to 4230 minutes (3 days) expiration; renewable. Graph webhooks are simpler than BC's native webhook setup but cover fewer entity types currently. ## Rate limiting Graph and BC both have throttling: - **Graph** — generous; throttle messages with `Retry-After` header. - **BC native** — environment-level limits; expect 429 responses on heavy load. Apps must respect throttle headers and back off. ## Coverage map Microsoft publishes documentation listing which BC entities are in Graph (status: GA / preview / beta) and which are only in native. Before designing an integration, verify the entity you need is in Graph at your chosen status level. **Versioning.** - **Graph v1.0** — stable, GA endpoints. - **Graph beta** — preview endpoints; may change. For production, prefer v1.0; beta for experimentation and feature requests. **Common pitfalls.** - **Assuming Graph has everything.** Niche BC features missing from Graph; the integration breaks when it hits them. - **Mixing Graph and native.** Two APIs in one integration; ambiguity about which to use when; complexity. - **Permission scope confusion.** Graph permissions vs BC permissions; admin grants Graph but not the underlying BC access. - **Webhook configuration drift.** Webhook expires; not renewed; events missed. - **Beta in production.** Beta endpoints change without notice; integrations break. - **Latency assumptions.** Cross-product queries through Graph can be slower than direct BC API; budget for it. ## Strategic positioning Microsoft's investment is in Graph as the unified surface. Over time, more BC functionality will appear there; new development should default to Graph for cross-product scenarios. Native BC APIs remain the right choice for BC-only deep integrations. Most production integrations end up using both — Graph for cross-product, native for BC-specific operations. Designing the integration to be agnostic to the API surface (with a thin wrapping layer in code) preserves flexibility as Microsoft's API strategy evolves. ## Operational guidance For new integrations: check Graph first; use native only when Graph doesn't cover the need. For existing integrations on native: don't migrate just for the sake of it; migrate when you're touching the code for other reasons or when Graph adds compelling new capabilities. --- # Microsoft Graph connectors for Dynamics 365 How Graph connectors index Dynamics 365 and Business Central data into Microsoft Search and Microsoft 365 Copilot — what they're for, how they work. Source: https://www.solvingdynamics365.com/guides/microsoft-graph-connectors-for-dynamics-365 Section: Integrations / API & identity Published: 2026-08-31 There's a gap between where Dynamics 365 data lives and where people spend their day. A salesperson working in Outlook and Teams doesn't want to open the CRM to check whether an account has open cases; a project manager writing a status report in Word wants last month's work orders findable without switching apps. A **Graph connector** closes that gap: it indexes content from an external system — Dataverse tables, Business Central records, or anything else — into the Microsoft Graph index, where it becomes searchable through Microsoft Search and, more importantly now, groundable by Microsoft 365 Copilot. That last part is why a feature that spent years as a search-admin curiosity suddenly matters. When M365 Copilot answers "what do we know about Contoso?", it can only draw on what's in its grounding reach — mail, files, Teams, and whatever Graph connectors have indexed. Without a connector, your CRM is invisible to the Copilot your organisation is paying for. ## How a Graph connector works The model is index-and-refresh, not live query: 1. **A connection is configured per source** — which environment, which tables, which columns — in the Microsoft 365 admin center (or programmatically via the Graph API for custom connectors). 2. **The connector crawls on a schedule**, with full crawls establishing the corpus and incremental crawls picking up changes. This is a copy of searchable text and metadata into the tenant's Graph index — not a federation layer. 3. **Each indexed item carries an access control list** mapped from the source system, and Microsoft Search trims results per user at query time. Someone who can't see a record in Dynamics doesn't see it in search results or Copilot answers — provided the ACL mapping is configured honestly rather than set to "everyone" to make testing easier. That shortcut has a way of becoming permanent. 4. **Results surface** in Microsoft Search (Office.com, SharePoint, Bing work search), in Copilot responses with citations, and in context-aware experiences like Context IQ. Microsoft ships gallery connectors for Dynamics 365 CRM tables and Business Central, alongside connectors for the systems you're likely consolidating search across anyway — Salesforce, ServiceNow, Jira, Confluence, file shares. For anything bespoke (a legacy ERP, a custom Dataverse-adjacent system), the Graph connectors API lets you build your own; it's a well-documented push API, and a custom connector is a realistic few-days build for an integration developer, not a platform project. ## Connector or agent? The decision that actually matters Graph connectors are one of two ways to put Dynamics data in front of Copilot, and picking wrong wastes months. The connector pattern suits **discovery**: static-ish, text-heavy content that people search for and Copilot should cite — account summaries, case histories, knowledge articles, product records. Its weaknesses are freshness (data is as current as the last crawl) and interactivity (an index answers "what exists?", never "create a follow-up task"). For **transactional** questions — live opportunity values, stock levels, "update the close date" — you want an agent or plugin built in Copilot Studio that calls Dataverse or the Business Central APIs at question time. The trade-offs run the other way: always-live data, real actions, but per-question latency and a build to maintain. Most organisations doing this seriously end up with both: a Graph connector making the corpus findable, and an agent handling the live operations. The split is covered from the agent side in [Copilot agents vs Copilot Studio](https://www.solvingdynamics365.com/guides/copilot-agents-vs-copilot-studio) and [Microsoft 365 Copilot for Dynamics 365](https://www.solvingdynamics365.com/guides/microsoft-365-copilot-for-dynamics-365). ## Practical notes before you switch one on - **Index selectively.** The instinct to index every table is wrong twice: index quota is finite (tenants get a capped item allowance, with more granted via M365 Copilot licensing), and irrelevant records dilute search relevance. Accounts, cases, and knowledge articles earn their place; forty million ledger entry rows do not. - **Choose columns for humans.** The connector indexes what you map. A record that surfaces in Copilot as a bare name with no description or owner is technically indexed and practically useless — map the columns that make a result self-explanatory. - **Plan the refresh cadence against expectations.** If sales expects this morning's notes in this afternoon's Copilot answer, an overnight incremental crawl will read as "broken". Set the schedule, then set expectations to match. - **Test security trimming with real users**, not admin accounts. Admin accounts see everything; the interesting failures are field workers seeing records their Dynamics security role would have hidden. - **Mind the licensing seam.** Graph connectors and Microsoft Search are Microsoft 365 features; the Dynamics side only controls what the connector may read. Quota and entitlement questions land with the M365 admin, which makes this one of the genuinely cross-team features — budget a conversation, not just a configuration. For the underlying plumbing — what the Graph API can do against Dataverse directly, beyond search — see [Microsoft Graph and Dataverse](https://www.solvingdynamics365.com/guides/microsoft-graph-and-dataverse), and for the Business Central flavour of the same story, [the Graph API with Business Central](https://www.solvingdynamics365.com/guides/graph-api-with-business-central). --- # Microsoft Teams integration patterns with Dynamics 365 How Dynamics 365 integrates with Microsoft Teams — collaboration on records, embedded apps, adaptive cards, Copilot, and meeting recording flows. Source: https://www.solvingdynamics365.com/guides/microsoft-teams-integration-patterns-with-dynamics-365 Section: Integrations / Data movement Published: 2026-05-01 Microsoft Teams is increasingly where business work happens — meetings, chat, file collaboration, decisions. Dynamics 365 has invested heavily in Teams integration over the past several releases so the work that touches CRM and ERP can stay in the Teams flow. The integration patterns are varied; choosing the right one per use case matters. ## Pattern 1: Share-to-Teams of CRM records From any Dynamics 365 record (account, opportunity, case, customer in Business Central, work order in Field Service), the user can **share to a Teams chat or channel**. The record renders in Teams as an **adaptive card** with key fields and a deep link back to Dynamics 365. The most common pattern; works out of the box. ## Pattern 2: Embedded model-driven apps in Teams Any Dynamics 365 model-driven app (Sales, Customer Service, Field Service) can be **added as a Teams app**, where the entire CRM experience appears as a tab inside a Teams channel or in the user's left navigation. Sellers can browse opportunities, update accounts, and respond to cases without leaving Teams. ## Pattern 3: Linked Teams collaboration on records A Dynamics 365 record (typically Account or Opportunity) can have a **linked Teams team or channel**. Conversations in the linked channel surface on the record's timeline; documents in the channel's file library link automatically to the record. Used for deal teams where many people collaborate on one opportunity. ## Pattern 4: Meetings with CRM context Adding a CRM contact as a meeting participant pulls in **meeting insights**: who they are, recent activity, open opportunities, open cases. Real-time during the meeting, Copilot summarises decisions; post-meeting, the recording can be saved to the related opportunity or account automatically. ## Pattern 5: Adaptive card actions from CRM Power Automate flows triggered by Dataverse can post **adaptive cards** to Teams chats or channels, with buttons for users to take action — approve a discount, accept a deal handoff, decline a service request. The action posts back to Dataverse or runs a follow-up flow. Used heavily for approvals and notifications. ## Pattern 6: Business Central in Teams Business Central has its own Teams app for SMB scenarios — share a customer/vendor/item card, look up records from Teams compose, run a quick action. Useful for organisations that live primarily in Teams. ## Pattern 7: Copilot agents in Teams **Copilot Studio agents** with Dynamics 365 knowledge sources and actions publish to Teams as chat-style agents. Users converse with the agent — "what's the status of opportunity X?", "open a case for customer Y" — and the agent reads/writes Dynamics 365 via the configured actions. ## Pattern 8: Teams calls integrated to CRM Dynamics 365 Omnichannel for Customer Service handles voice via Azure Communication Services; Teams calls (consumer-grade calls between Teams users and Dynamics 365 agents) integrate to surface CRM context, record the call, and post a summary. **Choosing.** - **Casual sharing of records** — built-in share-to-Teams. - **Heavy CRM use in Teams** — model-driven app added as Teams tab. - **Deal-team or case-team collaboration** — linked Teams team. - **Meetings with customers in CRM** — meeting integration. - **Approval workflow notifications** — adaptive card actions via Power Automate. - **Conversational interaction with CRM** — Copilot Studio agent. ## Governance Tenant-wide policies (Teams app permission policies, DLP) govern what Dynamics 365 components can run in Teams. ## Operational reality The Teams story for Dynamics 365 has been evolving across releases; document the integration choices and revisit them at each wave for new capabilities and deprecations. --- # MQTT and IoT integration with Dynamics 365 How MQTT protocol fits IoT scenarios for Dynamics 365 — Azure IoT Hub, message routing, and the patterns for getting device telemetry into Dynamics workflows. Source: https://www.solvingdynamics365.com/guides/mqtt-and-iot-with-dynamics-365 Section: Integrations / Eventing & messaging Published: 2026-05-01 IoT devices — sensors on equipment, connected vehicles, smart meters, manufacturing line monitors — speak a different language than enterprise APIs. **MQTT** (Message Queuing Telemetry Transport) is the dominant lightweight protocol for IoT; integrating MQTT-speaking devices with Dynamics 365 requires bridging IoT infrastructure to business systems. **Why MQTT for IoT.** - **Lightweight** — minimal overhead, works on constrained devices. - **Publish-subscribe** — many devices, many subscribers. - **Quality of Service levels** — Fire-and-forget to guaranteed delivery. - **Mature** — widely supported. Most IoT platforms support MQTT. **The integration architecture.** ``` IoT devices → MQTT → Azure IoT Hub → Event processing → Dynamics 365 ``` Each layer has specific responsibility; clean separation. ## Azure IoT Hub Microsoft's MQTT broker: - Accepts MQTT connections from devices. - Per-device authentication. - Message routing. - Cloud-to-device messaging. - Device management. For Microsoft-aligned organisations, IoT Hub is the natural broker. ## Event processing layer Between IoT Hub and Dynamics: - **Stream Analytics** — real-time SQL queries on telemetry. - **Functions** — code-level processing. - **Service Bus / Event Grid** — routing. - **Custom processing pipelines.** Raw telemetry is high-volume; processing reduces / aggregates / filters before reaching Dynamics. **What flows to Dynamics.** - **Alerts** — exceptions worth business attention. - **Aggregated telemetry** — hourly summaries, not raw readings. - **Status changes** — device went offline / online. - **Anomalies** — ML-detected unusual patterns. Dynamics shouldn't see every reading; only business-meaningful events. **Use cases for Dynamics 365 + IoT.** - **Connected Field Service** — equipment alerts trigger work orders. - **Predictive maintenance** — sensor data drives preventive maintenance. - **Customer asset monitoring** — visibility into customer's equipment. - **Manufacturing operations** — line status to F&O. - **Fleet management** — vehicle data for logistics. - **Smart buildings** — facility management. Each has specific architectural patterns. **Device-to-cloud authentication.** - **Per-device certificates** — strongest. - **Symmetric keys** — simpler. - **X.509** — managed via PKI. - **DPS (Device Provisioning Service)** — automatic enrolment. Each device has identity; only authenticated devices accepted. ## Cloud-to-device messaging Bidirectional: - **Device twin** — desired vs reported state. - **Direct methods** — invoke method on device. - **Cloud-to-device messages** — send notifications. For commanding devices from Dynamics (e.g., "shut off this valve"), the path exists. ## Stream Analytics example Aggregate raw temperature readings: ```sql SELECT deviceId, AVG(temperature) AS avgTemp, MAX(temperature) AS maxTemp, System.Timestamp() AS windowEnd INTO output FROM iotHubInput GROUP BY deviceId, TumblingWindow(minute, 5) HAVING AVG(temperature) > threshold ``` Per 5-minute window, devices exceeding threshold → output → triggers business workflow. **Routing to Dynamics.** - **Service Bus → Dataverse plug-in** — message becomes Dataverse event. - **Event Grid → Power Automate** → Dataverse update. - **Custom Function** → direct Dataverse API call. Each pattern has trade-offs in latency, reliability, complexity. **Volume considerations.** - **Industrial IoT** — millions of events per day. - **Pre-filter** — reduce before reaching Dynamics. - **Batch** — aggregate where appropriate. - **Direct database** — for analytics, bypass Dataverse. Dataverse not designed for raw IoT volume; treat carefully. **Data lake for raw telemetry.** - Raw events to lake (ADLS / OneLake). - Aggregations to Dynamics. - Analytics over lake. - Historical investigation in lake. This pattern separates concerns; Dynamics doesn't drown in volume. **Edge processing.** - **Azure IoT Edge** — processing at device level. - **Local analytics.** - **Filtered upload.** For high-volume / low-bandwidth scenarios, edge essential. **Alert design.** - **Threshold-based** — simple, well-understood. - **Anomaly detection** — ML; finds unusual patterns. - **Composite** — multiple conditions. - **Time-based** — sustained vs spike. Right alert design reduces false positives. **False positive management.** - **Tuning thresholds.** - **Aggregation windows.** - **Duration before alert** — sustained vs momentary. - **Acknowledgment / suppression.** Without tuning, alert fatigue. **Device lifecycle.** - **Provisioning** — new device onboarded. - **Active** — operational. - **Maintenance** — temporary downtime. - **Decommissioning** — end of life. Each state in Dynamics as customer asset record. **Security considerations.** - **Device authentication** — per-device credentials. - **Encryption** — TLS for MQTT. - **Compromised device handling** — revocation. - **Data privacy** — personal data implications. IoT extends attack surface; security essential. **Compliance.** - **GDPR** — even device data may be personal. - **Industry regulations** — varies. - **Data residency** — IoT Hub region selection. Plan compliance early; harder to retrofit. **Common pitfalls.** - **Direct device → Dataverse.** Inappropriate volume; Dataverse overwhelmed. - **No filtering.** All telemetry creates events; flood. - **No edge processing.** Heavy bandwidth. - **Insecure devices.** Default credentials; compromise. - **No device management.** Orphan devices accumulate. - **Alerts not actionable.** Fired but business doesn't know what to do. **Operational rhythm.** - **Real-time** — alert processing. - **Daily** — operational metrics review. - **Weekly** — alert tuning. - **Monthly** — device fleet review. - **Per incident** — RCA and improvement. ## Strategic positioning IoT + Dynamics is increasingly a competitive necessity for asset-intensive industries — utilities, manufacturing, transportation, healthcare equipment. The architecture is non-trivial; partner with experienced practitioners. For architects: - Layer the architecture (devices, broker, processing, business systems). - Filter aggressively at each layer. - Plan for scale. - Build observability across the chain. - Address security and compliance from start. The investment is substantial; the operational value of connected equipment compounds over years. Done well, IoT transforms field service, maintenance economics, and customer experience. Done poorly, it produces a torrent of noise with little business benefit. --- # Observability for Dynamics 365 integrations How to build observability into Dynamics 365 integrations — logs, metrics, traces, correlation IDs. Source: https://www.solvingdynamics365.com/guides/observability-for-dynamics-365-integrations Section: Integrations / Resilience & ops Published: 2026-05-01 A production integration that "works" by absence of complaints isn't truly working — it's just not failing visibly yet. **Observability** is the discipline of making system behaviour visible: what's happening, how well, with what latency, with what errors. For Dynamics 365 integrations spanning multiple systems, observability is essential for reliable operations. **The three pillars.** - **Logs** — discrete events with context. - **Metrics** — aggregated quantitative data. - **Traces** — request flow across services. Each gives different visibility; modern observability uses all three. **Logs in Dynamics 365 integrations.** - **Plug-in trace logs** — for Dataverse plug-in execution. - **Application Insights logs** — from custom code. - **Azure Function logs** — Azure-side processing. - **Service Bus / Event Grid logs** — message broker activity. - **Dataverse audit logs** — business-level changes. Each source contributes; centralising helps. **Structured logging.** ```csharp log.LogInformation("Order processed", new { OrderId = "...", CustomerId = "...", DurationMs = 123 }); ``` Structured logs enable filter, aggregation, correlation in tools like Application Insights, Splunk, ELK. ## Metrics Quantitative; useful patterns: - **Throughput** — messages per minute. - **Latency** — duration percentiles (P50, P95, P99). - **Error rate** — % failures. - **Saturation** — resource usage. The "USE" pattern (Utilization, Saturation, Errors) and "RED" pattern (Rate, Errors, Duration) are common frameworks. ## Distributed tracing Following a request across services: - **Correlation ID** generated at entry point. - **Propagated** in HTTP headers, messages, plug-ins. - **Logged at each hop.** - **Visualised** as trace graph. Enables "follow this request" debugging across many services. ## OpenTelemetry Open standard: - Vendor-neutral instrumentation. - Supports logs, metrics, traces. - Multiple language libraries. - Export to Application Insights, Datadog, Jaeger, etc. Modern recommendation: use OpenTelemetry; future-proof. **Application Insights for Dynamics.** - Dataverse integrates with App Insights (configurable). - Plug-in traces flow to App Insights. - Custom code emits. - Centralised dashboard. For Microsoft-aligned organisations, App Insights is the natural starting point. ## Per-integration observability Each integration should provide: - **Heartbeat** — is it running? - **Throughput** — messages processed. - **Latency distribution.** - **Error rate.** - **Dependent system health.** Each integration's health visible separately. ## End-to-end visibility Cross-integration: - **Business transaction tracking** — order received → processed → fulfilled. - **SLA monitoring** — was order processed within commitment? - **Funnel analysis** — where in flow do issues occur? Customer-facing SLA depends on end-to-end visibility. **Alerting.** - **Error rate spike** — alert. - **Latency degradation** — alert. - **Throughput drop** — alert (something broken upstream). - **Heartbeat missing** — alert. Each alert routes to on-call or operations. ## Alert quality Critical: - **Actionable** — recipient knows what to do. - **Not too noisy** — don't fatigue responders. - **Severity-appropriate** — critical via page; informational via email. - **Correlated** — one alert per incident, not 100. Bad alerting is worse than no alerting; people ignore. **Dashboards.** - **Operations dashboard** — current state at a glance. - **Business dashboard** — business-relevant metrics. - **Per-integration drill-down.** - **Incident dashboards** — for ongoing investigations. Dashboards different per audience. ## Per-message observability Trace a specific message: - Where did it start? - What systems handled it? - How long at each step? - Did it succeed? For customer service ("what happened to my order?"), this matters. **SLA / SLO tracking.** - **Service Level Objective** — target performance. - **Service Level Agreement** — contractual. - **Error budget** — allowable failures. - **Burn rate** — how fast budget consumed. Mature operations have SLOs informed by observability. **Logging best practices.** - **Structured** — JSON or similar. - **Levels** — Debug / Info / Warning / Error. - **Sensitive data excluded** — no PII, secrets. - **Context-rich** — IDs, timestamps, source. - **Sampled** for high-volume — full logging too expensive. **Common pitfalls.** - **No observability.** Issues only known when users complain. - **Verbose logging.** Logs flood; signal lost. - **No correlation.** Can't trace requests across services. - **Per-system silos.** Each system has logs; no unified view. - **Alerts ignored.** Too noisy; alert fatigue. - **Sensitive data in logs.** Compliance violation. - **Retention too short.** Can't investigate older issues. **Cost considerations.** - **Log volume** — App Insights / Datadog priced by ingestion. - **High-cardinality metrics** — expensive. - **Long retention** — expensive. Balance: enough observability to operate; not so much it bankrupts. **Privacy considerations.** - Logs may contain personal data. - GDPR / privacy regulations apply. - Retention policies needed. - Subject access requests might include logs. Design with privacy in mind. **Audit logs vs operational logs.** - **Audit** — for compliance; long retention. - **Operational** — for diagnostics; shorter retention. Different needs; separate streams typically. **Observability culture.** - **Engineers add observability** as they write code. - **Reviews include observability check.** - **Incidents analyse observability gaps.** - **Continuous improvement.** The culture determines whether observability is investment or afterthought. ## Strategic positioning Observability is the foundation of operational excellence. Without it, integration operations is reactive and chaotic; with it, problems are detected and resolved fast. For architects: - Design observability into integrations from start. - Standardise on tooling. - Build dashboards and alerts. - Train operators. - Iterate based on incidents. The investment is meaningful but compounds: every integration benefits from the foundation. The teams that take observability seriously have predictable operations; the teams that don't have surprise incidents. The difference is largely the observability discipline. --- # OpenTelemetry with Dynamics 365 integrations How OpenTelemetry standardises observability in Dynamics 365 architectures — instrumentation, exporters, distributed tracing. Source: https://www.solvingdynamics365.com/guides/opentelemetry-with-dynamics-365 Section: Integrations / Resilience & ops Published: 2026-05-01 Observability for Dynamics 365 integrations spans many systems — plug-ins, Azure Functions, Service Bus, external APIs. Each has its own logging story; collecting consistent telemetry across all is hard. **OpenTelemetry** is the open-standard answer: vendor-neutral instrumentation that exports to many backends. For multi-system Dynamics architectures, OpenTelemetry simplifies observability. **What OpenTelemetry is.** - Open standard for instrumentation. - CNCF project. - Supports logs, metrics, traces. - Vendor-neutral instrumentation. - Many language libraries. - Export to many backends (App Insights, Datadog, Jaeger, etc.). The headline value: instrument once, export anywhere. **Why it matters.** - **No vendor lock-in.** Change observability backend without rewriting instrumentation. - **Consistency.** Same patterns across languages and services. - **Distributed tracing standard.** W3C Trace Context for cross-service correlation. - **Modern.** Active development; growing adoption. For new instrumentation, OpenTelemetry is the recommended choice. **Three signal types.** - **Traces** — request flow across services. - **Metrics** — quantitative aggregated data. - **Logs** — discrete events. OpenTelemetry covers all three; many older tools focus on one. **Instrumentation libraries.** - **.NET** — OpenTelemetry SDK for C#. - **Java** — well-supported. - **Python, Node.js, Go, Ruby** — all supported. - **Auto-instrumentation** — many libraries instrumented automatically. For .NET (typical Dynamics environment), OpenTelemetry SDK provides comprehensive support. **Distributed tracing.** - **Trace** — full end-to-end request. - **Span** — single operation within trace. - **Trace ID** — links all spans in a trace. - **Parent-child relationships** between spans. A trace visualises as a Gantt-like chart: which service did what when. ## W3C Trace Context Standard format: - HTTP header `traceparent` carries context. - All services that understand it propagate. - Cross-service correlation just works. Without standard format, each service uses its own; correlation hard. ## Span attributes Per span: - Service name. - Operation name. - Duration. - Status (OK / Error). - Attributes (key-value, e.g., HTTP status, customer ID). Attributes enable filtering and analysis. **OpenTelemetry Collector.** - Receives data from instrumented apps. - Processes (filtering, sampling, transformation). - Exports to backends. Decouples app from backend; switch backends without app change. **Exporters.** - **Azure Monitor / Application Insights** — most common for Microsoft stack. - **Jaeger** — open-source tracing. - **Zipkin** — older open-source. - **Datadog, New Relic, Splunk** — commercial. Same instrumentation; export to one or many. **Instrumentation in Dynamics plug-ins.** - Plug-in code emits spans for major operations. - Spans correlated to incoming context. - Exported to App Insights or other. Plug-in tracing becomes part of broader distributed trace. **Instrumentation in Azure Functions.** - Built-in OpenTelemetry support increasing. - Auto-instrumentation for HTTP, Service Bus, etc. - Custom spans for business operations. Function-level traces tied to broader trace context. **Sampling.** - **Always sample** — full visibility; expensive. - **Probabilistic** — sample N% of traces. - **Tail sampling** — sample based on outcome (sample all errors). Sampling balances visibility and cost. **Custom metrics.** ```csharp var meter = new Meter("MyService"); var counter = meter.CreateCounter("orders_processed"); counter.Add(1, new KeyValuePair("status", "success")); ``` Counters, gauges, histograms; emitted to backend. ## Semantic conventions OpenTelemetry defines standards: - HTTP attributes — method, URL, status. - Database attributes — system, statement. - Messaging attributes — destination, operation. Consistent attribute names enable cross-service analysis. **Migration from existing observability.** - **Application Insights SDK** — Microsoft-specific; replace with OpenTelemetry + AppInsights exporter. - **Custom logging** — gradually replace. Coexistence possible; full migration over time. **Performance overhead.** - Modest; well-designed for production. - Sampling reduces cost. - Don't instrument hot loops. Production-ready performance. **Trace context in messaging.** - Service Bus messages carry trace context in properties. - Event Grid similarly. - Consumers continue the trace. Async patterns preserve correlation. **Trace context in Dataverse.** - Plug-in receives operation; what's the trace context? - Custom header passed via HTTP integrations. - For Dynamics-internal events, requires plug-in pattern. Capturing context across Dataverse plug-in boundary is the integration point. **Visualisation.** - **App Insights end-to-end transaction details** — trace flame graph. - **Jaeger UI** — open-source. - **Custom dashboards** — tailored. Visualisation reveals system behaviour patterns. **Use cases.** - **Performance investigation** — where did time go in a slow request? - **Error correlation** — find related errors across services. - **Dependency mapping** — what calls what. - **Capacity planning** — bottleneck identification. **Common pitfalls.** - **Over-instrumentation.** Performance degraded; cost explodes. - **Under-instrumentation.** Gaps in visibility. - **No context propagation.** Traces broken; can't follow request. - **Sensitive data in attributes.** Compliance issue. - **Sampling too aggressive.** Important traces missed. - **Single backend lock-in.** Defeats OpenTelemetry's purpose. **Best practices.** - **Start with auto-instrumentation** for common libraries. - **Add custom spans** for business operations. - **Use semantic conventions.** - **Configure sampling** for cost / visibility balance. - **Propagate context** through messaging. - **Document trace topology.** ## Strategic positioning OpenTelemetry is the modern observability standard. Dynamics 365 integrations using OpenTelemetry get vendor-neutral instrumentation that exports to current and future backends. The investment is modest — replace existing libraries with OpenTelemetry, configure exporters — and pays back in flexibility and depth of visibility. For architects: - Default to OpenTelemetry for new code. - Migrate existing instrumentation gradually. - Standardise span / metric naming. - Build dashboards on the foundation. For organisations on App Insights, OpenTelemetry coexists seamlessly. For others or those wanting vendor flexibility, OpenTelemetry is the path. Either way, it's the direction the observability industry is moving; aligning early reduces future migration burden. --- # PCF controls vs embedded canvas apps Two ways to put custom UI on a Dynamics 365 form — a Power Apps component framework control or an embedded canvas app — and how to choose based on data access. Source: https://www.solvingdynamics365.com/guides/integrating-pcf-controls-vs-embedded-canvas-apps Section: Integrations / Architecture patterns Published: 2026-09-02 A model-driven form is a fine thing until someone wants a map, a drag-and-drop scheduler, a visual configurator, a signature pad, or a pane that pulls live data from a system outside Dataverse. Then you need custom UI inside the form, and Power Platform gives you two very different tools for it: a Power Apps component framework (PCF) control, which is code that replaces or extends a field or a grid, or an embedded canvas app, which is a whole low-code app rendered inside a form section. They overlap enough that projects pick the wrong one regularly. ## What each actually is A **PCF control** is a TypeScript component built with the PCF tooling, packaged in a solution, and bound to a field, a dataset, or a subgrid on the form. It receives its data through a context object the platform provides, renders with whatever framework you choose (React is the common one), and writes values back through the same context. It is a first-class part of the form: it resizes with it, respects the form's read-only state, and behaves the same on web and mobile. See [PCF controls in Power Apps](https://www.solvingdynamics365.com/guides/pcf-controls-in-power-apps). An **embedded canvas app** is an ordinary canvas app that is placed on a model-driven form and receives the current record as context through the ModelDrivenFormIntegration control. It is built in the canvas designer with Power Fx, uses connectors for data, and lives in the same solution as the form. It runs in an iframe within the form section. ## Data access is the first fork A PCF control bound to a field sees that field. A dataset PCF control sees the rows of a view or subgrid. Beyond that, it can call the Dataverse Web API through the context, and it can call external endpoints, but every external call is code you write and authenticate yourself. An embedded canvas app has the full connector library: Dataverse, SharePoint, SQL, Office 365, and hundreds of others, with authentication handled by the platform. If the custom UI needs to pull from three external systems, the canvas app has them wired in an afternoon. So: data that is on the form or in Dataverse points to PCF; data scattered across connectors points to canvas. ## Performance and fidelity PCF controls load as part of the form and feel native. A well-built one is indistinguishable from a platform control. They work in offline mode on the mobile app when built for it, and they respect the form's theming and accessibility conventions if the developer does. Embedded canvas apps add an iframe, a separate app load, and a visibly different rendering surface. On a fast connection with a small app the delay is a second or two; on a slow one, or with an app that has grown, users notice. They do not work offline in the model-driven mobile app. Layout is fixed-size within the form section, and making a canvas app look like it belongs on the form takes deliberate effort. For anything the user sees on every record load, PCF. For something opened deliberately, such as a side panel or a tool the user reaches for occasionally, canvas is acceptable. ## Who builds and maintains it PCF is a developer artefact: Node tooling, TypeScript, a build pipeline, unit tests if the team is disciplined. When the developer leaves, the next one needs the same skills. Updating the control means rebuilding and reimporting the solution. An embedded canvas app is a maker artefact. A functional consultant or a capable business user can adjust the layout, add a connector, or change a formula without a build. That is a real advantage in organisations without a permanent development team, and a real risk in organisations without governance, because the app can drift far from what was tested. ## Licensing A PCF control that only uses Dataverse and the form's context is covered by the user's Dynamics 365 or Power Apps licence. A PCF control that calls premium external services does not change the licence position by itself. An embedded canvas app that uses premium connectors requires the user to hold a licence that covers them, which Dynamics 365 enterprise licences generally do, but check; a canvas app using a premium connector for users on a Team Member licence is a common surprise. ## Where each is clearly right PCF: replacing a field's editor (a rich text control, a colour picker, a rating), rendering a subgrid differently (a Kanban, a timeline, a map of records), anything on the main form that must be fast and must work offline, and controls you intend to reuse across many forms and tables. Embedded canvas app: a self-contained tool that pulls from external connectors (a document checklist from SharePoint, a pricing lookup from an external SQL database), a guided data-entry wizard that would be awkward as form logic, and prototypes that need to exist by Friday. ## Where each is clearly wrong A PCF control that reimplements a whole application in one field. Nobody wants to maintain that. An embedded canvas app on the main tab of the most-used form, loading on every record open, with a dozen connectors. Users will complain within the week. ## What breaks in practice PCF controls built against an old version of the framework that stop working after a platform update; keep the tooling current. Canvas apps embedded on forms that were shared with the wrong audience so half the users see an error. Either type that hard-codes environment-specific URLs; use environment variables. ## Stability verdict Both are mature and both are supported. PCF is the more durable investment for anything central to the user experience. Embedded canvas apps are the faster path and a reasonable permanent answer for peripheral tools. Read [canvas apps vs model-driven apps](https://www.solvingdynamics365.com/guides/canvas-apps-vs-model-driven-apps) if the real question is whether the whole app should have been canvas to begin with. ### Frequently asked questions **What is the difference between a PCF control and an embedded canvas app?** A PCF control is TypeScript code bound to a field, dataset, or subgrid that renders natively in the form, resizes with it, and works offline. An embedded canvas app is a full low-code app in an iframe on a form section, receiving the current record through the ModelDrivenFormIntegration control. **Which one should I use for data from external systems?** The canvas app. It has the full connector library with platform-handled authentication. A PCF control can call external endpoints, but every call is code you write and authenticate yourself. **Which performs better?** PCF. It loads with the form and feels native. An embedded canvas app adds an iframe and a separate app load, does not work offline in the model-driven mobile app, and gets slower as it grows — keep it off the main tab of the most-used form. **Are there licensing differences?** A PCF control using Dataverse and form context is covered by the user's licence. An embedded canvas app using premium connectors requires a licence that covers them — Team Member users hitting a premium connector is a common surprise. --- # Polling vs push patterns for Dynamics 365 integrations How to choose between polling and push integration patterns for Dynamics 365 — trade-offs, performance, freshness, and when each fits. Source: https://www.solvingdynamics365.com/guides/polling-vs-push-patterns-for-dynamics-365 Section: Integrations / Architecture patterns Published: 2026-05-01 Integrating Dynamics 365 with another system requires choosing how data flows: **polling** (consumer asks periodically) or **push** (source notifies on change). Each pattern has different trade-offs in freshness, complexity, and resource consumption. Most production architectures use both for different scenarios. **Polling pattern.** - Consumer periodically queries source. - "Has anything new since last check?" - Source returns delta or nothing. - Consumer processes any new data. Simple to implement; well-understood; works with any data source. **Push pattern.** - Source notifies consumer on event. - Consumer processes immediately. - No periodic queries. More efficient at scale; requires source support for notifications. **Polling characteristics.** - **Simple** — basic HTTP/SQL queries. - **Predictable load** on source — fixed query frequency. - **Latency** — bounded by poll interval. - **Self-healing** — if consumer down, catches up on resumption. - **No source coupling** — consumer's choice. **Push characteristics.** - **Lower latency** — near-instant. - **Lower overhead** — no wasted polls when nothing changed. - **Source coupling** — source must support notification. - **Recovery complex** — if consumer down, missed events need replay. - **Burst-y load** — high spikes at busy times. **When polling wins.** - **Source doesn't push** — no notification API. - **Latency tolerance** — minutes acceptable. - **Simple integration** — minimise complexity. - **Batch processing** — process accumulated data efficiently. - **Predictable resource usage** preferred. **When push wins.** - **Real-time needs** — seconds matter. - **High volume with low change rate** — polling wastes resources. - **Source supports webhooks / events.** - **Pubsub patterns** — multiple consumers. **Polling implementations for Dynamics.** - **OData with modifiedon filter** — `$filter=modifiedon gt '2026-11-01T...'`. - **Change tracking** — Dynamics's incremental change endpoint. - **Custom delta endpoint** — implementation in plug-in. - **Database polling** — direct SQL queries (sometimes for F&O). **Push implementations for Dynamics.** - **Webhooks** — Dataverse webhook step. - **Service Bus** — Dataverse → Service Bus → consumer. - **Event Grid** — Dataverse → Event Grid → consumers. - **Power Automate** — flow triggered on Dataverse change. - **Business events** — F&O business events. **Polling parameters.** - **Frequency** — how often to query. - **Batch size** — records per poll. - **Filter** — what to retrieve. - **Retry on failure.** Frequency vs freshness trade-off. Faster polling = more current but more load. ## Adaptive polling Smarter polling: - **High activity** — poll more frequently. - **Low activity** — back off. Reduces wasted polls during quiet periods. ## Long polling Hybrid: - Consumer makes request. - Source holds the connection. - Source responds when data available or timeout. - Consumer immediately requests again. Combines polling simplicity with push-like latency. ## Webhooks A push pattern: - Source sends HTTP POST to consumer on event. - Consumer accepts; processes. - Source typically expects 200 quickly; further processing async on consumer side. **Webhook reliability.** - **Retries on failure** — limited. - **No replay** typically — lost events lost. - **Dead letter** if used (Service Bus / Event Grid). For critical events, webhook-only is risky; broker-mediated push (Service Bus) is more reliable. **Hybrid approaches.** - **Push for real-time** — immediate. - **Polling for catch-up** — periodic reconciliation. - **Both for redundancy** — robust against either failing. Belt-and-suspenders; common for mission-critical integrations. ## Reconciliation polling Combined pattern: - Push for normal flow. - Periodic polling to catch any missed events. - Reconcile differences. This pattern handles webhook reliability gaps. **Performance considerations.** - **Polling load** — depends on frequency and source efficiency. - **Push load** — depends on event volume. For high-change-rate systems, push usually more efficient. For low-change-rate, polling can be cheaper. **Throttling and limits.** - **Dynamics APIs** — rate-limited. - **Polling too frequently** — hits throttling. - **Push** — limits at broker level. Respect throttling; honour Retry-After headers. **Monitoring.** - **Polling** — track query frequency, returned counts. - **Push** — track events emitted vs received. - **End-to-end latency** — both patterns. - **Lag / backlog** — accumulation. Visibility regardless of pattern. **Choosing in practice.** - **Real-time integration?** → push. - **Source pushes available?** → push. - **Batch-acceptable latency?** → polling. - **Mission-critical reliability?** → hybrid. - **Simple integration?** → polling. - **High volume?** → push usually. **Common pitfalls.** - **Polling too frequently** — throttled; expensive. - **Polling too rarely** — stale data. - **No idempotency** — duplicates from retries. - **Webhook without retry strategy** — events lost. - **No monitoring** — pattern silently failing. - **Hard-coded URLs** — webhook URLs change; integration breaks. **Migration patterns.** - **Polling → push** when source adds notification support. - **Push → polling** when broker overhead exceeds benefit. Architecture not religious; adapt as systems evolve. ## Strategic positioning Polling vs push is a core integration architecture decision. Both have valid use; understand trade-offs per integration. Default to push for real-time and high-volume scenarios; polling for simpler, batch-acceptable cases; hybrid for critical reliability. For architects: - Make conscious choice per integration. - Document the rationale. - Build observability for chosen pattern. - Re-evaluate as systems evolve. The pattern choice affects user experience, infrastructure cost, and operational complexity. Choose with care; don't default to one without consideration. ### Frequently asked questions **When should I poll instead of push?** When the source has no notification support, minutes of latency are acceptable, batch processing is efficient, or predictable load and simplicity matter more than freshness. Polling also self-heals: a consumer that was down catches up on its next poll. **How do I poll Dataverse efficiently?** Use change tracking for incremental deltas, or an OData filter on modifiedon with explicit paging. Respect throttling and Retry-After headers — polling too often is the classic way to get rate-limited. **What push options exist for Dynamics 365?** Dataverse webhooks, Service Bus or Event Grid service endpoints, Power Automate flows triggered on Dataverse changes, and business events in Finance and Operations. **What is reconciliation polling?** A hybrid: push for the normal real-time flow plus a periodic poll that catches anything the push path missed and reconciles differences. It is the standard belt-and-braces pattern for mission-critical integrations. --- # Power Automate connectors for Dynamics 365 The standard and premium Power Automate connectors for Dynamics 365 — what each one does, the differences, and the licensing implications. Source: https://www.solvingdynamics365.com/guides/power-automate-connectors-for-dynamics-365 Section: Integrations / API & identity Published: 2026-05-01 Updated: 2026-09-06 Power Automate connectors are the bridges between flows and other systems. For Dynamics 365 customers, several connectors matter — and the difference between standard and premium connectors is important for licensing and capability. ## Microsoft Dataverse connector The right connector for any CRM-side D365 app (Sales, Customer Service, Field Service, Project Operations, Customer Insights, Power Apps with Dataverse). Triggers on row created/updated/deleted/added; actions for full CRUD, executing actions, file uploads, and relating records. Supports filtering and column selection. Premium connector — flows using it require a Power Automate per-user or per-flow licence beyond what's included with most Dynamics 365 SKUs. ## Common Data Service (current environment) connector The older name; functionally equivalent and being phased out in favour of "Microsoft Dataverse". Still appears in older flow templates. ## Dynamics 365 connector (legacy) An older connector for CRM-side apps, predating Dataverse-native. Microsoft recommends migrating to the Dataverse connector. ## Dynamics 365 Business Central connector First-party. Triggers and actions for Customer, Vendor, Item, Sales Order, Purchase Order, Sales Invoice, Sales Quote, Journal Lines, Locations, and many more. Standard CRUD and bound actions for posting, releasing, and cancelling documents. Premium. ## Dynamics 365 Finance and Operations (legacy) connector Targets F&O data entities. Premium. ## Dynamics 365 for Fin & Ops (Recurring Integrations) A separate connector that targets the recurring integration API for batched data project imports/exports. ## Custom connectors When the first-party connector doesn't expose what you need, build a **custom connector** from an OpenAPI/Swagger definition. Custom connectors are premium and use the same authentication and policy framework as built-in ones. ## Licensing This is where teams get caught out. A flow that uses *only* standard connectors (SharePoint, Outlook, Teams, Office 365) can run on the free Power Automate licence bundled with M365. A flow that uses a **premium connector** — Dataverse, Business Central, F&O, SQL Server, HTTP, custom connector — requires a *premium* Power Automate licence on the **flow owner**. Per-user (one user, unlimited flows) or per-flow (one flow, unlimited users) plans are available. Most Dynamics 365 SKUs include limited premium Power Automate rights, often labelled *"Power Automate for Dynamics 365"* — these allow flows that are **directly related to the licensed Dynamics 365 app**, but not arbitrary Power Automate use. ## Throttling Each connector has request limits per user per 24h, plus shorter spike limits. Bursty flows can hit the limits and produce HTTP 429s. Throttle limits are documented per connector; the most common D365 connector limits are generous but real — see [throttling and 429 errors](https://www.solvingdynamics365.com/guides/power-platform-throttling-and-429-errors) for how to read the response headers and design around them. ## Connector cheat sheet | Connector | Standard or premium | Typical use | |---|---|---| | Microsoft Dataverse | Premium | Any CRM-side app: Sales, Customer Service, Field Service, Project Operations, custom Power Apps | | Dynamics 365 Business Central | Premium | Sales/purchase documents, items, customers, journal lines in BC | | Dynamics 365 Finance and Operations (legacy) | Premium | F&O data entities via the older connector surface | | SharePoint, Outlook, Teams, Office 365 Users | Standard | Notifications, document handling, approvals bundled into a D365-adjacent flow | | HTTP / custom connector | Premium | Anything with no first-party connector — a partner API, a legacy on-prem system via gateway | | Approvals | Standard | Human-in-the-loop steps inside an otherwise premium flow | Mixing standard and premium connectors in the same flow makes the whole flow premium — there is no "mostly free" middle ground. A flow that sends a Teams notification and updates a Dataverse row needs a premium licence on its owner because of the Dataverse step, even though Teams alone is standard. ## Connection references and ownership In a solution-aware (managed) environment, flows use **connection references** rather than embedding a personal connection directly. This decouples "who built the flow" from "whose credentials it runs under" and is what makes a flow survive its original author leaving the team — a connection reference can be repointed to a service account or another maker's connection without editing the flow itself. Skipping connection references (building directly against a personal connection) is the most common reason a flow silently breaks when its author's account is disabled. ## Choosing a connector when more than one option exists For CRM-side data, the modern default is always the **Microsoft Dataverse** connector — the legacy **Dynamics 365** and **Common Data Service (current environment)** connectors exist only for backward compatibility with flows built years ago, and Microsoft's own guidance is to migrate off them. For Business Central, the first-party connector covers the vast majority of document and master-data scenarios; reach for the BC API directly through an HTTP or custom connector only when a specific endpoint the first-party connector doesn't expose (a custom API page, for instance) is genuinely required. ## Connector cheat sheet | Connector | Standard or premium | Typical use | |---|---|---| | Microsoft Dataverse | Premium | Any CRM-side app: Sales, Customer Service, Field Service, Project Operations, custom Power Apps | | Dynamics 365 Business Central | Premium | Sales/purchase documents, items, customers, journal lines in BC | | Dynamics 365 Finance and Operations (legacy) | Premium | F&O data entities via the older connector surface | | SharePoint, Outlook, Teams, Office 365 Users | Standard | Notifications, document handling, approvals bundled into a D365-adjacent flow | | HTTP / custom connector | Premium | Anything with no first-party connector — a partner API, a legacy on-prem system via gateway | | Approvals | Standard | Human-in-the-loop steps inside an otherwise premium flow | Mixing standard and premium connectors in the same flow makes the whole flow premium — there is no "mostly free" middle ground. A flow that sends a Teams notification and updates a Dataverse row needs a premium licence on its owner because of the Dataverse step, even though Teams alone is standard. ## Connection references and ownership In a solution-aware (managed) environment, flows use **connection references** rather than embedding a personal connection directly. This decouples "who built the flow" from "whose credentials it runs under" and is what makes a flow survive its original author leaving the team — a connection reference can be repointed to a service account or another maker's connection without editing the flow itself. Skipping connection references (building directly against a personal connection) is the most common reason a flow silently breaks when its author's account is disabled. ## Choosing a connector when more than one option exists For CRM-side data, the modern default is always the **Microsoft Dataverse** connector — the legacy **Dynamics 365** and **Common Data Service (current environment)** connectors exist only for backward compatibility with flows built years ago, and Microsoft's own guidance is to migrate off them. For Business Central, the first-party connector covers the vast majority of document and master-data scenarios; reach for the BC API directly through an HTTP or custom connector only when a specific endpoint the first-party connector doesn't expose (a custom API page, for instance) is genuinely required. ## The pattern For any non-trivial flow involving Dynamics 365, plan: which premium connectors does it call, who owns it (ideally a service account behind a connection reference, not a named person), and what licence does the owner have. Decide this before building, not after a flow silently stops working when someone's trial licence lapses. --- # Retry policies with Azure services How to implement retry policies in Azure-based Dynamics 365 integrations — exponential backoff, idempotency, circuit-breaker integration. Source: https://www.solvingdynamics365.com/guides/retry-policies-with-azure-services Section: Integrations / Resilience & ops Published: 2026-05-01 Network blips, rate limiting, downstream slowness — transient failures are inevitable in distributed systems. **Retry policies** absorb these failures by trying again with appropriate backoff. Implemented well, they make integrations resilient; implemented badly, they amplify failures into incidents. **Transient vs permanent failures.** - **Transient** — temporary; succeeds on retry. Network glitch, rate limit, brief downstream outage. - **Permanent** — won't succeed however many retries. Schema mismatch, auth failure, business validation failure. Retry only transients; permanent failures need different handling (alert, dead-letter, manual). ## Failure classification Decide per error type: - **HTTP 5xx** — usually transient. - **HTTP 429 Too Many Requests** — definitely transient; respect Retry-After. - **HTTP 4xx** — usually permanent (validation, auth). - **HTTP 408 Request Timeout** — transient. - **Connection errors** — transient. - **Specific application errors** — depends. The classifier is critical; misclassifying causes infinite retry of permanent failures. **Backoff strategies.** - **Fixed delay** — wait N seconds, retry. - **Linear backoff** — N, 2N, 3N seconds. - **Exponential backoff** — N, 2N, 4N, 8N seconds. - **Exponential with jitter** — exponential + random variance. Exponential with jitter is modern default; prevents thundering herd. **Why jitter.** - Without jitter, all retries synchronise. - Many clients failing simultaneously retry at the same moment. - Spike overwhelms the recovering downstream. Random jitter spreads retries; smoother recovery. **Max retries.** - **Bounded** — give up after N attempts. - **Unbounded** — retry forever (rare; usually wrong). Bounded count protects against permanent failures masquerading as transient. ## Retry-After header When server says how long to wait: - HTTP response includes `Retry-After: 30` (30 seconds) or absolute time. - Honour it; don't retry sooner. - Common in 429 (rate limit) responses. Ignoring Retry-After can extend the throttling. **Implementation libraries.** - **Polly (.NET)** — declarative retry policies. - **Resilience4j (Java)** — similar. - **AxiosRetry (Node)** — for axios HTTP client. - **Azure SDK** — built-in retry on many operations. Choose mature library; rolling your own retry is error-prone. **Polly example.** ```csharp var retryPolicy = Policy .Handle() .Or() .WaitAndRetryAsync( retryCount: 5, sleepDurationProvider: attempt => TimeSpan.FromSeconds(Math.Pow(2, attempt)) + TimeSpan.FromMilliseconds(jitterer.Next(0, 1000)) ); await retryPolicy.ExecuteAsync(async () => await client.PostAsync(url, content)); ``` Five retries with exponential backoff and jitter; handles common transient cases. ## Idempotency Critical for retries: - Retry might succeed after thinking it failed. - Duplicate processing on receiving side. - Idempotency means same input → same outcome, regardless of count. Patterns: - **Idempotency-Key header** — receiver dedupes by key. - **Natural keys** — operation tied to unique business identifier. - **State-based** — set state idempotently. Without idempotency, retries cause data corruption. ## Retry + circuit breaker Combined patterns: - **Retry** handles individual call failures. - **Circuit breaker** handles sustained failure patterns. Wrap retry inside circuit breaker: - Retries happen within circuit-closed state. - When too many failures total, circuit opens; retries stop. - Periodic test to re-open if downstream recovered. Covered in [Circuit breakers in Dynamics 365 integrations](https://www.solvingdynamics365.com/guides/circuit-breakers-in-dynamics-365-integrations). **Per-service retry policies.** - **Dataverse** — handle 429s, 5xx; respect Retry-After. - **Service Bus** — built into SDK; configurable. - **Azure Storage** — built-in retries; can override. - **External APIs** — per-API characteristics. Each service may need tuned policy. ## Retry budget Limit total retry effort: - Per-request retry count (5 attempts). - Per-time-window total retries (1000 retries per minute across all requests). Without budget, retry storms exhaust resources. **Retry observability.** - **Retry count metric** — how often retries happen. - **Success-after-retry rate** — what % succeed. - **Failures after exhausted retries** — what truly fails. These metrics reveal integration health beyond just success/failure. **Distributed retry.** - Multiple consumers each retry. - Aggregate retry traffic significant. - Coordination via shared rate limiter helpful. For high-scale, single-client retry isn't enough. ## Dead-letter on exhaustion When all retries fail: - Message → dead-letter queue. - Alert raised. - Operator inspects. - Manual resubmission or remediation. Closes the loop on retry-failed messages. **Common pitfalls.** - **No retry.** First transient failure becomes user-visible. - **Naive retry.** No backoff; tight retry loop hammers downstream. - **Retry permanent failures.** Forever; resource exhaustion. - **Idempotency forgotten.** Retries cause duplicates. - **Throttling ignored.** Retries faster than allowed; permanently throttled. - **No timeout** on individual attempts. Stuck retry; resource leak. - **Retry on wrong layer.** Application retries when SDK already retried; effective retry count multiplies. **Best practices.** - **Use library** — Polly, Resilience4j, etc. - **Classify errors** — transient vs permanent. - **Exponential + jitter.** - **Bounded count.** - **Timeout per attempt.** - **Observable metrics.** - **Dead-letter on exhaustion.** - **Idempotent receivers.** ## Strategic positioning Retry policies are foundational reliability infrastructure. Mature integrations have considered retry policies per integration; immature ones have ad-hoc or no retries. The investment is modest — using libraries, classifying errors, building monitoring. The benefit is integrations that survive transient issues without operational intervention. For architects: - Default to library-based retry. - Document policy per integration. - Monitor retry metrics. - Combine with circuit breaker, dead-letter, idempotency. Production-grade integration architecture has all these patterns working together. Skipping any one weakens the whole. Invest in the foundation; benefit through every integration thereafter. --- # SOAP vs REST vs GraphQL for Dynamics 365 How the three API styles compare for Dynamics 365 integrations — capabilities, when each fits, and the practical considerations for choosing. Source: https://www.solvingdynamics365.com/guides/soap-vs-rest-vs-graphql-for-dynamics-365 Section: Integrations / Architecture patterns Published: 2026-05-01 Three predominant API styles offer different trade-offs for Dynamics 365 integrations: **SOAP** (the legacy enterprise standard), **REST/OData** (the dominant modern API style, what Dataverse uses), and **GraphQL** (the modern query-language alternative). Each has a place; choosing wisely matters. **SOAP overview.** - XML-based. - WSDL contract. - Strict typing. - Built-in standards (WS-Security, WS-AtomicTransaction). - Verbose payloads. Origin: late 1990s enterprise integration; still common in legacy. **REST overview.** - Resource-oriented. - HTTP verbs (GET, POST, PUT, DELETE). - JSON typical. - Stateless. - Lighter than SOAP. Dominant since mid-2000s; modern default. ## OData A specific REST flavour: - Standardised query semantics ($select, $filter, etc.). - Used by Dataverse and F&O. - Rich query capability. **GraphQL overview.** - Single endpoint. - Client specifies query shape. - Strongly typed schema. - Subscriptions for real-time. - One round-trip for complex data. Emerged 2015 from Facebook; popular for client-rich apps. **Comparison.** | Aspect | SOAP | REST/OData | GraphQL | |---|---|---|---| | Format | XML | JSON | JSON | | Verbosity | High | Moderate | Moderate | | Contract | WSDL | OpenAPI | Schema | | Query flexibility | Low | Moderate (OData) | High | | Caching | Hard | HTTP-friendly | Custom | | Tools | Mature, enterprise | Vast | Growing | | Real-time | WS-* extensions | Push patterns | Subscriptions | **Dynamics 365 native.** - **Dataverse** — REST/OData. SOAP organization service still supported but deprecated. - **F&O** — REST/OData via data entities. Custom services can use either. - **GraphQL** — not native; available via wrappers. For Dynamics integrations, REST/OData is the canonical choice. **When SOAP still appears.** - Integration with legacy enterprise systems (SAP, mainframes, banking). - Existing investments unfeasible to migrate. - Specific industry standards requiring SOAP. - Some Microsoft legacy APIs (older organization service). For Dynamics, SOAP is for legacy compat, not new development. **When REST/OData wins (most Dynamics scenarios).** - Calling Dynamics from any system. - Standard tools and libraries. - HTTP-friendly (caching, proxies). - Lighter than SOAP. Default for new Dynamics integrations. **When GraphQL helps.** - Front-end consumer benefits from query flexibility. - Mobile / bandwidth-constrained scenarios — request only what's needed. - Multiple data sources federated. - Strong developer experience preference. Less common in Dynamics native scenarios; useful when fronting Dynamics + other systems. **Performance comparison.** - **REST** — multiple endpoints; potentially multiple round-trips for related data. - **OData $expand** — fetch related in one call. - **GraphQL** — request exact shape; one round-trip. - **SOAP** — typically heavier payloads. For complex queries, GraphQL can be most efficient; OData $expand often sufficient. **Caching.** - **REST** — HTTP caching (ETags, Cache-Control). - **GraphQL** — harder; POST-based queries. - **SOAP** — typically no caching. Caching favours REST. **Versioning.** - **REST** — `/v1/`, `/v2/` paths or headers. - **GraphQL** — schema evolution (deprecate fields). - **SOAP** — namespace versions. Each has pattern; all manageable. **Tooling.** - **REST** — Swagger / OpenAPI, Postman, curl, every language. - **OData** — additional tools for OData specifically. - **GraphQL** — Apollo, Relay, GraphQL Playground. - **SOAP** — older tools; still many. For Dynamics, REST tooling dominant. **Security.** - **REST** — OAuth 2.0 typical. - **GraphQL** — same. - **SOAP** — WS-Security with signatures and encryption. Modern: OAuth for all; WS-Security in legacy contexts. **Custom Dynamics services.** - **OData custom actions / functions** — extend Dataverse standard API. - **Custom REST APIs in Azure Functions** — for non-Dataverse logic. - **GraphQL wrappers** — for specific scenarios. - **SOAP services** — rare; for legacy integration. The right choice depends on consumer and pattern. **Multi-API support.** - Some integrations expose multiple flavours. - API Gateway abstracts; consumers choose. - More work but maximises consumer choice. **Migration considerations.** - **SOAP → REST** — common modernisation; significant effort. - **REST → GraphQL** — quality-of-life upgrade; substantial work. - **REST to additional GraphQL** — coexist; not migration. **Common pitfalls.** - **SOAP for new development.** Almost always wrong choice today. - **REST without OpenAPI** — undiscoverable, hard to integrate. - **GraphQL without query depth limits** — DoS vulnerability. - **OData over-fetch** — without $select, fetching too much. - **API style chosen by trend, not fit.** **Best practices.** - **Default to REST/OData** for Dynamics consumers. - **Document with OpenAPI.** - **Use OAuth.** - **Version explicitly.** - **Consider GraphQL for complex client-rich apps**. - **Maintain SOAP only for legacy.** ## Hybrid landscapes Most enterprises have all three: - Legacy SOAP for old integrations. - REST/OData for most. - GraphQL for specific scenarios. Not religious choice; pragmatic per integration. ## Strategic positioning REST/OData is the right default for Dynamics 365 integrations. GraphQL is occasionally useful when client experience demands. SOAP is for legacy connectivity only. For architects: - Choose pragmatically per integration. - Standardise where possible. - Document API styles in architecture. - Plan modernisation of SOAP legacy. The teams that obsess over API style choice often lose sight of what matters: clear contracts, reliable operations, manageable evolution. Pick a style, do it well, focus on the outcomes. ### Frequently asked questions **Which API style does Dynamics 365 use natively?** REST with OData. Dataverse exposes an OData v4 Web API, and Finance and Operations exposes data entities over OData. The SOAP-era organization service still exists for legacy compatibility, and GraphQL is only available through wrappers. **When does SOAP still appear?** In legacy enterprise integrations — SAP, mainframes, banking — and industry standards that mandate it. For new Dynamics development it is almost always the wrong choice. **When is GraphQL worth adding?** When a client-rich or mobile front end benefits from requesting exactly the shape it needs, or when several back ends are federated behind one endpoint. Add it alongside OData rather than replacing it, and enforce query depth limits. **What is the most common OData mistake?** Over-fetching — calling endpoints without $select and pulling every column. $select and $expand together usually make a single OData call as efficient as a GraphQL query. --- # The outbox pattern with Service Bus A resilient integration pattern for Dynamics 365 — combining an outbox table with Service Bus to deliver guaranteed-once messaging across systems. Source: https://www.solvingdynamics365.com/guides/the-outbox-pattern-with-service-bus Section: Integrations / Architecture patterns Published: 2026-05-05 ### Key facts - The outbox pattern decouples recording intent from delivering a message: a plug-in or flow writes to an outbox table in the same Dataverse transaction as the business change, so either both commit or neither does. - A separate publisher worker, typically an Azure Function on a timer running every 10-30 seconds, reads new outbox rows, publishes them to Service Bus, and marks them published. - Once a message reaches Service Bus, the downstream consumer can be offline for hours or days without losing it, and the consumer must still be designed to be idempotent since it can receive the same message twice. - If Dataverse change tracking is enabled, a publisher worker can poll it instead of a custom outbox table, using the platform's built-in delta mechanism for the same effect. - The pattern is not appropriate for low-stakes integrations where occasional inconsistency is recoverable, or for real-time UI-blocking calls, since the outbox is inherently asynchronous with seconds-to-a-minute of added latency. For mission-critical integrations between Dynamics 365 and external systems, naive direct calls have a problem: what happens when Dynamics 365 commits a transaction but the integration call fails? The change exists in Dynamics 365 but never reached the downstream system; data is now inconsistent. The **outbox pattern** solves this by combining a Dataverse "outbox" table with Azure Service Bus to guarantee that every committed change reaches downstream systems exactly once, eventually. **The problem with direct integration calls.** A typical pattern: a plug-in on Dataverse opportunity-close fires, calls an external API to push the sale to the back-office ERP, the API responds, the plug-in completes, the transaction commits. What can go wrong: - The API call succeeds but the Dataverse transaction rollbacks for unrelated reasons. The downstream system has the data; Dataverse doesn't. Inconsistency. - The API call times out (5-minute plug-in limit). The plug-in fails; Dataverse rollbacks. From the user's perspective, the operation failed; but the downstream may have processed it. - The API is temporarily unavailable. The plug-in fails; the user retries; but the rule is "do this only once". These problems are why naive synchronous integration is unreliable for important data. **The outbox pattern.** The pattern decouples the *recording* of intent from the *delivery* of the message: 1. **Within the Dataverse transaction**: a plug-in (or flow) records a message into an **outbox table** in Dataverse. The outbox row holds the payload, target, and metadata. The Dataverse transaction commits atomically — either both the business change and the outbox row commit, or neither. 2. **Out of band**: a separate worker (Azure Function on a timer, a flow on schedule, a continuous-running service) reads new outbox rows, publishes them as Service Bus messages to the appropriate queue, then marks the outbox row as published. 3. **Service Bus** durably holds the message. The downstream consumer reads at its own pace. 4. **Idempotent consumer**: the downstream system processes each Service Bus message and is designed to be idempotent — receiving the same message twice produces the same result (no double-processing). 5. **Confirmation**: optional — the consumer acks back, and the outbox row marks complete. **Why this works.** - **Atomic outbox commit** — the business change and the message-to-send commit together. Either both happen or neither. - **Service Bus durability** — once the message is on the queue, downstream can be offline for hours / days without losing it. - **Idempotency** — the consumer can safely receive a message twice (e.g. if the publisher published, then crashed before marking the outbox row complete). - **Retry** — failed deliveries retry from the queue; persistent failures land in the dead-letter queue for investigation. **Implementation in Dataverse.** - **Outbox table** — a custom Dataverse table with columns: payload (JSON), target, status (Pending / Published / Acked / Failed), created date, published date, retry count. - **Plug-ins / flows** — insert rows into the outbox in the same transaction as the business change. - **Publisher worker** — Azure Function on a timer, every 10–30 seconds, queries new outbox rows and publishes them. - **Service Bus** — the durable channel. - **Downstream consumer** — reads Service Bus messages, processes idempotently, optionally acks back. ## The change tracking alternative If Dataverse change tracking is enabled, the publisher worker can poll change tracking instead of an explicit outbox table. The pattern is similar but uses Dataverse's built-in delta mechanism rather than a custom outbox. **When to use the outbox pattern.** - **Mission-critical integrations** where data loss is unacceptable. - **High-volume integrations** where Service Bus's durability and decoupling matter. - **Cross-system business processes** that span Dataverse and other systems. **When not.** - **Low-stakes integrations** where occasional inconsistency is recoverable. Direct calls or basic webhooks suffice. - **Read-only integrations** where the consumer pulls from Dataverse. The outbox is about *push from Dataverse*, not pull. - **Real-time UI-blocking calls** — outbox is asynchronous; users don't wait for downstream success. **Trade-offs.** - **Complexity** — multiple components to design, build, monitor. The reliability benefit must justify the complexity. - **Latency** — outbox-based integration has small delay (seconds to a minute typically). For most business processes that's fine; for some it isn't. - **Operational discipline** — monitor outbox depth, dead-letter queue, retries. Without active monitoring, problems hide. **Common pitfalls.** - **Outbox not in the same transaction** — defeats the purpose. The outbox insert must be atomic with the business change. - **Consumer not idempotent** — duplicates cause double-processing. Use message IDs or natural keys. - **No dead-letter handling** — failed messages accumulate silently. Build alerting. - **Outbox not cleaned up** — millions of completed rows degrade Dataverse performance. Archive or delete old rows. ## Operational reality The outbox pattern is canonical enterprise-integration practice; not specific to Dynamics 365. Adopting it for the integrations that matter is one of the highest-leverage reliability investments. ## Where to go next The queue side is covered in [Service Bus integration with Dataverse](https://www.solvingdynamics365.com/guides/azure-service-bus-integration-with-dataverse) and the Business Central variant in [webhooks vs Service Bus](https://www.solvingdynamics365.com/guides/integrating-business-central-webhooks-vs-service-bus). For multi-step transactions on top of the outbox, [the saga pattern](https://www.solvingdynamics365.com/guides/saga-pattern-for-dynamics-365) and [eventually consistent integrations](https://www.solvingdynamics365.com/guides/eventually-consistent-integrations-with-dynamics-365); for the read-side alternative, [change tracking in Dataverse](https://www.solvingdynamics365.com/guides/change-tracking-in-dataverse). --- # The saga pattern for cross-system Dynamics 365 transactions How to handle multi-system business transactions that need to be atomic across Dynamics 365 and external systems — orchestration vs choreography, compensation. Source: https://www.solvingdynamics365.com/guides/saga-pattern-for-dynamics-365 Section: Integrations / Architecture patterns Published: 2026-08-07 A business operation often spans multiple systems — placing an order updates Dynamics 365 CRM, debits inventory in F&O, charges the payment processor, ships from the WMS. Each system has its own transaction; there's no global transaction that wraps all four. If one fails partway, the others may have already committed. The **saga pattern** is how to handle this — multi-step business operations that must succeed-as-a-whole-or-rollback-the-side-effects, across systems that don't share a transaction context. **The problem.** Traditional database transactions guarantee ACID — all operations succeed atomically or all fail. Across systems, ACID doesn't work — there's no two-phase commit across Dataverse, F&O, the payment processor, and the WMS. Each commits independently. If step 3 fails after steps 1-2 succeeded, you need to undo steps 1-2 explicitly — a **compensating transaction**. The saga pattern formalises this. **The saga.** A **saga** is a sequence of local transactions: ``` T1 → T2 → T3 → T4 (success path) ``` Each Ti is a transaction in one system. If any Ti fails, **compensating transactions** run in reverse: ``` C1 ← C2 ← C3 (undoing T1, T2, T3 if T4 fails) ``` Where Ci is the operation that undoes Ti's effects. The saga either reaches completion (all forward steps succeed) or fully rolls back (all completed forward steps are compensated). **Two implementation styles.** ## Orchestration A central **saga orchestrator** drives the sequence: ``` Orchestrator → System A: do step 1 System A: done Orchestrator → System B: do step 2 System B: done ... ``` If a step fails, the orchestrator initiates compensation: ``` Step 3 failed Orchestrator → System B: compensate step 2 Orchestrator → System A: compensate step 1 ``` The orchestrator knows the full state and recovery logic. Typically built with Azure Durable Functions, Workflow Designer, or similar tooling. ## Choreography No central orchestrator. Each system publishes events; subsequent systems react. A failure publishes a "rollback" event that triggers compensation in upstream systems. Choreography decouples but distributes the saga logic. Harder to reason about; useful for very loosely-coupled systems. For most Dynamics 365 cross-system business processes, **orchestration** is the cleaner pattern. **Implementing a saga.** **Order placement example.** Steps: 1. **T1**: Create order in Dynamics 365 Sales (status = Draft). 2. **T2**: Reserve inventory in F&O. 3. **T3**: Charge payment via payment processor. 4. **T4**: Update Dynamics 365 order to Confirmed; release to WMS. Compensations: - **C1**: Cancel order in Dynamics 365 (status = Cancelled). - **C2**: Release inventory reservation in F&O. - **C3**: Refund payment via payment processor. Implementation with an orchestrator (Azure Durable Functions): ```csharp // Pseudocode for an orchestrator public async Task PlaceOrderSaga(OrderRequest order) { try { await CreateOrderInD365(order); try { await ReserveInventoryInFnO(order); try { await ChargePayment(order); await ConfirmOrderInD365(order); // Success } catch { await ReleaseInventoryInFnO(order); // C2 throw; } } catch { await CancelOrderInD365(order); // C1 throw; } } catch { // Log; alert; possibly retry throw; } } ``` In real implementations, durable orchestrators (Azure Durable Functions, Power Automate workflows with state, custom workflow engines) handle the retry logic, durability across restarts, and timeout handling. **Compensation pattern principles.** - **Compensations are semantically reversing, not bit-for-bit undo.** Cancelling an order leaves a "Cancelled" record — it's not deleted. The compensation reverses the *business effect*, not the *technical write*. - **Compensations should be idempotent.** A compensation may also fail and retry; running it twice produces the same final state. - **Some operations are not reversible.** Sending an email; debiting a card (sometimes — refunds may have time limits). Build with the trade-off in mind: irreversible operations need extra care upfront. - **Order matters.** Compensations typically run in reverse order; compensating T3 first then T2 is the standard. **Timeouts and SLAs.** Long-running sagas need timeout handling: - Step times out → consider that step failed → trigger compensation. - Whole saga times out → manual intervention; alert operations. **Visibility.** A user placing an order shouldn't wait for the full saga to complete if it takes seconds-to-minutes. The pattern: acknowledge the order is being processed (return quickly); the saga runs asynchronously; the user is notified on success or failure. This UX requires: - Async API design. - Status records the user can check. - Notifications on completion. ## Power Automate as orchestrator Simple sagas can be implemented as Power Automate flows. Limitations: - Long-running flows have time limits. - Compensation logic must be hand-written. - State and visibility through flow run history. For more complex sagas, Azure Durable Functions or custom orchestration is preferable. **When to use the saga pattern.** - **Genuine multi-system business operations** that must be atomic. - **Operations crossing 3+ systems** where partial completion would be invalid. - **Operations with meaningful side effects** that need explicit rollback. **When not.** - **Operations within a single system** — use that system's transaction. - **Truly fire-and-forget** events — if partial completion is acceptable, no saga needed. - **Read-only operations** — no rollback needed. ## Operational reality Sagas add complexity. Justify the pattern by the business requirement; document the compensation logic clearly; test failure paths deliberately (chaos-engineering style); monitor sagas in production. --- # Virtual network data gateway for Dynamics 365 How the virtual network (VNet) data gateway enables Dynamics 365 and Power Platform to access data in private Azure VNets — architecture, configuration. Source: https://www.solvingdynamics365.com/guides/virtual-network-data-gateway-for-dynamics-365 Section: Integrations / Azure services Published: 2026-05-01 Dynamics 365 and Power Platform often need to reach data sitting in private networks — Azure SQL Databases with private endpoints only, on-prem databases via ExpressRoute, services behind firewalls. Traditionally, this required the **on-premises data gateway** — a Windows service installed in the customer environment. The **virtual network data gateway** is a managed alternative: fully Microsoft-hosted, deployed into the customer's Azure virtual network, no Windows server to maintain. **The on-premises gateway recap.** - A Windows service installed in customer infrastructure. - Polls Microsoft cloud for work. - Bridges Power Platform / Dynamics requests to private data. - Customer-managed — patching, scaling, monitoring. - Available for over a decade; mature; widely used. **The virtual network data gateway.** - **Managed by Microsoft** — no Windows server to install or patch. - **Deployed into customer's Azure virtual network** — a subnet hosts the gateway. - **Accesses resources inside the VNet** — Azure SQL with private endpoint, Azure Function, etc. - **Connects to Microsoft cloud** through standard mechanisms. The headline benefit: customer's data stays inside their VNet; Microsoft's compute reaches in temporarily to fetch what's needed. **Architecture.** ``` Power Platform / Dynamics 365 | v Microsoft cloud (gateway service) | v Customer Azure VNet subnet for gateway | v Customer private resources ``` The gateway is provisioned in the customer's VNet but operated by Microsoft. The customer controls the VNet, the NSG rules, the resources it accesses; Microsoft operates the gateway runtime. **Configuration.** 1. Customer Azure subscription has a VNet with appropriate routing. 2. A subnet is dedicated for the gateway. 3. Subnet is delegated to `Microsoft.PowerPlatform/vnetaccesslinks`. 4. In Power Platform admin, the gateway is created referencing the VNet/subnet. 5. Data sources in the VNet are added to the gateway's connections. 6. Power Apps, flows, and Power BI reports use the gateway to reach the private resources. The setup is mostly Azure VNet plumbing plus a Power Platform reference. **Use cases.** - **Azure SQL with private endpoint** — public access disabled; gateway reaches via private endpoint. - **Azure Function with VNet integration** — internal logic accessible to Power Automate. - **Private Azure Storage** — files in storage accounts without public access. - **Azure Cosmos DB private** — private endpoints. - **Custom Azure-hosted APIs** — internal services accessible only inside VNet. - **On-prem via ExpressRoute** — if VNet is connected to on-prem via ExpressRoute, gateway reaches on-prem resources too. **Comparison with on-premises gateway.** | Aspect | On-prem gateway | VNet gateway | |---|---|---| | Hosting | Customer Windows server | Microsoft managed | | Patching | Customer | Microsoft | | Scaling | Manual / replica | Auto | | HA | Cluster of installs | Built-in | | Data path | Through customer infrastructure | Through Azure | | Use case | On-prem databases | Azure VNet resources | VNet gateway is the modern path for Azure-resident private resources; on-prem gateway remains for true on-prem data. **Authentication and authorisation.** - **Power Platform / Dynamics user** authenticates to Power Platform. - **Gateway** authenticates to data source (SQL credentials, managed identity, OAuth). - **Identity flow** depends on connector — some support pass-through, some require fixed credentials. For SQL access, the cleanest pattern is managed identity for the gateway connecting to SQL. **Performance.** - **Throughput** — comparable to direct connections. - **Latency** — slight added latency from cross-region or VNet routing. - **Connection pooling** — gateway maintains connection pools. For high-volume queries, gateway performance is reasonable; bulk data movement still benefits from ADF or other dedicated tools. **Networking specifics.** - **NSG rules** — control what the gateway subnet can reach. - **Private endpoints** — point to specific resources without public routing. - **DNS** — Azure Private DNS Zones for name resolution. - **Service endpoints** — for some Azure services if needed. VNet design matters; misconfigured networking gives confusing errors. **Monitoring.** - **Connection health** — visible in Power Platform admin. - **Query metrics** — request counts, latency. - **Errors** — connection failures logged. The managed gateway has better observability than the on-prem alternative; Azure-native logs. **Common pitfalls.** - **NSG too restrictive.** Gateway can't reach target; cryptic errors. - **Wrong subnet delegation.** Subnet not delegated to Power Platform service; gateway provisioning fails. - **Private endpoint DNS broken.** Gateway resolves to public IP, doesn't find resource; private DNS zones needed. - **No high availability planning.** Single gateway; outage affects all dependent flows. - **Connection limits.** Many flows hitting the same gateway; throttling. - **Cost surprise.** VNet gateway has hourly cost; budget. ## Cost VNet gateway is paid per gateway hour: - Reasonable for moderate usage. - Multiple gateways multiply cost. - Compare to on-prem gateway (free, but Windows server cost). For Azure-resident workloads, VNet gateway often wins on TCO once Windows server admin is included in on-prem gateway cost. **Migration from on-prem gateway.** - Add VNet gateway alongside. - Reconfigure connections to use VNet gateway. - Validate flows still work. - Decommission on-prem gateway. Migration is gradual; both can coexist during transition. ## Strategic positioning The VNet data gateway is Microsoft's path forward for Power Platform / Dynamics 365 private network access. For new deployments where data sits in Azure VNets, it's the default. For existing on-prem gateway deployments, evaluate moving to VNet gateway as Azure infrastructure modernises. The benefit isn't transformative — connections work either way — but operational simplicity (no Windows servers, no patching, no clustering) compounds over time. For modern, Azure-centric data architectures, the VNet gateway removes a longstanding piece of customer-managed infrastructure. Worth adopting for new work; worth migrating to gradually for existing. --- # Webhooks in Business Central How webhook subscriptions work in Business Central — subscribing, renewing, payloads, and the realities of consuming change notifications. Source: https://www.solvingdynamics365.com/guides/webhooks-in-business-central Section: Integrations / Eventing & messaging Published: 2026-05-01 Business Central can push change notifications to external systems via **webhook subscriptions**, so consumers don't need to poll. It's the recommended way to integrate when external systems need to react to BC changes promptly. The mechanics are simple; the operational discipline is what catches people out. ## The model An external system registers a **subscription** with BC, declaring: - The **resource** to watch — a v2.0 API entity set, e.g. `companies({id})/customers` or a specific table via a custom API. - The **change types** — `created, updated, deleted`. - The **notification URL** — where BC will POST notifications. - The **client state** — a token the subscriber chooses, returned in notifications for verification. BC validates the URL during subscription creation by POSTing a validation token; the URL must return it within seconds, exactly as received. This is how BC verifies the subscriber owns the URL. ## Notifications When a watched resource changes, BC POSTs a notification (or batch of notifications) to the URL. The payload contains **resource URLs** and change type but **not** the changed data itself — the subscriber must GET the resource to see what changed. This indirection is deliberate: it keeps notifications small, lets the subscriber filter by re-checking permissions, and avoids stale data over slow subscribers. ## Retry and durability BC retries failed deliveries for a limited window with exponential backoff. After repeated failures, the subscription is deactivated and the subscriber must re-create it. **There is no message replay** — if your endpoint is down past the retry window, those notifications are lost. Build for reliability. ## Subscription expiry Subscriptions auto-expire (typically after 3 days). Consumers must **renew** before expiry by extending the subscription. Renew at half the lifetime to handle clock skew and downtime. ## Authentication Notifications are POSTed *as Business Central* to the subscriber's URL — no auth header is added by BC. The subscriber authenticates the call by checking that the **client state** matches the value it gave at subscription time. Treat client state like a shared secret. ## Throttling A tenant has a finite number of active webhook subscriptions and a cap on notification rate. High-change tables (item ledger, GL entry) generate many notifications; subscribe to higher-level entities (sales orders, posted invoices) where possible. ## Scale pattern Don't subscribe directly from a single endpoint to a high-volume entity. Use a webhook → Service Bus or Storage Queue → worker pattern: the webhook handler quickly enqueues the notification and returns 200; a worker processes it asynchronously with retries. This decouples the subscriber's processing time from BC's expectation of a fast 200 response. ## When to use Real-time integration of moderate volume — sync a sales order to a shipping service the moment it's released. For bulk or batch needs, use the API directly with `If-Modified-Since` or change-tracking semantics. --- # Webhooks vs events in Dataverse How Dataverse exposes change notifications — webhooks, service endpoints to Azure Service Bus / Event Hub / Event Grid. Source: https://www.solvingdynamics365.com/guides/webhooks-vs-events-in-dataverse Section: Integrations / Eventing & messaging Published: 2026-05-01 ### Key facts - Every event-publication mechanism in Dataverse originates from the same place — a plug-in step registered against a table event — and the destination (webhook, Service Bus, Event Hub, Event Grid) is what changes. - Webhooks have no dead-letter queue: a receiver failure after retries exhausts means the event is permanently lost, which is why critical integrations should use Service Bus or Event Grid instead. - Asynchronous publication is almost always the right choice for external events — a synchronous webhook makes Dataverse wait on the external receiver's response, and a slow receiver makes Dataverse itself feel slow to users. - All delivery mechanisms are at-least-once, not exactly-once, so every receiver needs to be idempotent — able to process the same event twice without duplicate side effects. When something happens in Dataverse — a record created, updated, or deleted — external systems often need to react. Dataverse provides multiple mechanisms to publish these events: plug-in step → webhook, plug-in step → service endpoint (Service Bus, Event Hub, Event Grid). Each has different reliability, scale, and operational characteristics. ## The plug-in step pattern All event publication originates from the same place: a plug-in step registered against a table event. The step's destination determines the mechanism: - **In-process plug-in** — runs in Dataverse, mutates the row or related rows. - **Webhook** — Dataverse POSTs to an external HTTPS endpoint. - **Service endpoint** — Dataverse publishes to Azure Service Bus, Event Hub, or Event Grid. Each is configured via the Plug-in Registration Tool or solution-aware code, with similar registration metadata. **Webhooks.** - Dataverse calls an HTTPS URL with the event payload. - Endpoint receives, returns 200 (or fails). - Synchronous delivery — Dataverse waits for the response before continuing (with timeout). - Retries on failure (limited retries; eventually gives up). - Authentication via shared key or no auth (with caution). Best for: - Custom logic running in Azure Functions, Logic Apps, or your own services. - Quick integration without infrastructure. - Scenarios where occasional event loss is tolerable. Limitations: - **Reliability** — receiver failures lead to dropped events after retry exhaustion. - **Scale** — Dataverse blocks while waiting for response; slow receivers impact source. - **Ordering** — no strict ordering guaranteed. **Azure Service Bus.** - Dataverse publishes to a Service Bus queue or topic. - Decoupled — events buffered for subscribers. - Strong reliability — guaranteed delivery to receivers. - Subscribers process at their own pace. - Higher infrastructure cost; needs Service Bus namespace. Best for: - High-reliability integrations. - Heavy downstream processing. - Multiple consumers of the same event. **Azure Event Hub.** - High-throughput event ingestion. - Optimised for many events per second. - Used with telemetry-style scenarios. Best for: - Very high-volume event streams. - Analytics ingestion. - Event sourcing patterns. **Azure Event Grid.** - Event routing with topic/subscription model. - Multiple subscribers per event. - Native integration with many Azure services. - Generally lower cost for moderate volumes than Service Bus. Best for: - Pub/sub patterns with multiple receivers. - Routing events to various Azure services. - Cross-product Azure-centric integrations. **Comparison table.** | Aspect | Webhook | Service Bus | Event Hub | Event Grid | |---|---|---|---|---| | Coupling | Tight | Loose | Loose | Loose | | Reliability | OK | High | High | High | | Volume | Low-mid | Mid-high | Very high | Mid-high | | Setup complexity | Low | Mid | Mid | Mid | | Cost | None | Per msg | Per ingestion | Per operation | | Use case | Simple webhook | Critical integration | Telemetry | Pub/sub routing | **Synchronous vs asynchronous.** - **Synchronous (Pre/Post-op stage)** — plug-in fires inline with the Dataverse operation; user waits. - **Asynchronous (Post-op + async)** — fires after commit, queued, executed by Dataverse's async job processor. For external publication, asynchronous is almost always right — sync webhooks block the user's experience. ## Payload format The payload varies: - **Native Dataverse format** — `ExecutionContext` serialised. - **CloudEvents** — when configured for Event Grid in CloudEvents schema mode. CloudEvents is the modern, interoperable format; preferred for new integrations. **Authentication.** - **Webhook** — shared key (header value), or HTTP Basic. - **Service Bus** — connection string (SAS key) with policy. - **Event Hub / Event Grid** — similar SAS-based auth. Service principal-based auth is preferred over shared keys; setup is more complex but more secure. ## Filtering at source Reduce noise by only publishing events that matter: - **Filtering attributes** — only fire when specific columns change. - **Conditional execution** — plug-in checks before publishing. Source-side filtering reduces downstream volume. **Replay and dead-letter handling.** - **Service Bus** — dead-letter queue for failed messages; messages can be inspected and re-processed. - **Event Hub** — events persist for configurable retention; consumers can replay. - **Event Grid** — dead-letter to storage; advanced retry policy. - **Webhook** — no dead-letter; permanent loss after retries. For critical integrations, never use webhooks alone — the lack of dead-letter handling is operationally risky. ## Idempotency Receivers should be idempotent — handle the same event twice without bad side effects. All event mechanisms have at-least-once delivery; duplicates happen. **Monitoring.** - **Plug-in execution failures** — visible in Dataverse async job logs. - **Service Bus metrics** — message counts, dead-letter counts. - **Webhook failures** — show in Dataverse but not retrievable beyond a window. Service Bus and Event Grid provide much richer observability than webhooks alone. **Common pitfalls.** - **Webhook for critical events.** Receiver failure = event lost; downstream system out of sync. Use Service Bus or Event Grid for reliability. - **No idempotency at receiver.** Duplicate events cause duplicate side effects. - **Source-side filtering missing.** All updates published; downstream system overwhelmed. - **Authentication via shared keys.** Keys leak in code or logs; security incident. - **No dead-letter handling.** Failed events disappear; integration silently incomplete. - **Synchronous webhook with slow receiver.** Dataverse operations slow for users; blame the system. ## Strategic positioning Choose the mechanism per integration's needs: - **Internal Power Platform integrations** — Power Automate flows triggered by Dataverse events, no Service Bus needed. - **Lightweight external** — webhook to Azure Function. - **Critical external** — Service Bus or Event Grid. - **Very high-volume telemetry** — Event Hub. The cost of choosing wrong: brittle integrations. The cost of choosing right: infrastructure investment that pays back in reliability. Most production integrations should use Service Bus or Event Grid; webhooks are for prototypes and low-stakes scenarios. ## Where to go next Deeper on each destination: [Service Bus integration](https://www.solvingdynamics365.com/guides/azure-service-bus-integration-with-dataverse), [Event Grid with Dataverse](https://www.solvingdynamics365.com/guides/event-grid-with-dataverse), and the reliability pattern that makes any of them safe, [the outbox pattern](https://www.solvingdynamics365.com/guides/the-outbox-pattern-with-service-bus). Receivers need [idempotency](https://www.solvingdynamics365.com/guides/idempotency-in-dynamics-365-integrations); the step that publishes is a plug-in, whose failure modes are in [plug-in exceptions explained](https://www.solvingdynamics365.com/guides/dataverse-plugin-exceptions-explained). ### Frequently asked questions **What are the options for publishing Dataverse events externally?** A plug-in step registered on a table event whose destination is a webhook (HTTPS POST) or a service endpoint to Azure Service Bus, Event Hub, or Event Grid. All are configured through the Plug-in Registration Tool with similar metadata. **Why not use webhooks for critical integrations?** Webhooks have limited retries and no dead-letter queue, so a failing receiver eventually means a permanently lost event. Service Bus and Event Grid buffer, guarantee delivery, and dead-letter failures for inspection and replay. **Should the publishing step be synchronous or asynchronous?** Asynchronous, almost always. A synchronous webhook makes the user wait for the external receiver, and a slow receiver makes Dataverse feel slow. **Do receivers need to be idempotent?** Yes. Every mechanism delivers at least once, so duplicates happen. Receivers must handle the same event twice without duplicate side effects. **Which Azure service fits which scenario?** Service Bus for critical integrations with heavy downstream processing; Event Grid for pub/sub routing to multiple Azure subscribers at moderate volume; Event Hub for very high-volume telemetry-style streams.