Production-tested patterns for connecting Power Platform to Business Central.
FlexAPI design, Power Automate flows, Canvas App templates, and Azure Function middleware — built from real enterprise consulting projects.
Business Central is powerful as an ERP, but it becomes transformative when integrated with Power Platform. The challenge: BC's native connectors have limitations, API complexity is high, and most teams struggle with authentication, pagination, and error handling.
This repository provides reusable patterns that solve real integration problems:
- FlexAPI — Configurable API layer exposing BC data for Fabric & Power BI
- Power Automate — Approval workflows, document routing, event-driven triggers from BC
- Power Apps — Canvas App patterns for non-BC-licensed users (purchase requests, approvals)
- Azure Functions — Middleware for BC ↔ Blob Storage, document processing, webhook handling
- Power BI — DirectQuery and Import patterns for BC reporting
┌──────────────────────────────────────────────────────────────────────┐
│ USER INTERACTION LAYER │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ Power Apps │ │ Power BI │ │ Teams / Outlook │ │
│ │ Canvas App │ │ Dashboards │ │ Adaptive Cards │ │
│ └──────┬───────┘ └──────┬───────┘ └──────────┬───────────┘ │
└──────────┼─────────────────┼─────────────────────┼──────────────────┘
│ │ │
┌──────────▼─────────────────▼─────────────────────▼──────────────────┐
│ INTEGRATION LAYER │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ FlexAPI │ │ Power │ │ Azure Functions │ │
│ │ (BC ext.) │ │ Automate │ │ (Middleware) │ │
│ │ │ │ │ │ │ │
│ │ - Custom API │ │ - Approvals │ │ - BC → Blob sync │ │
│ │ - Pagination │ │ - Doc route │ │ - Webhook receiver │ │
│ │ - Filtering │ │ - BC events │ │ - Doc processing │ │
│ └──────┬───────┘ └──────┬───────┘ └──────────┬───────────┘ │
└──────────┼─────────────────┼─────────────────────┼──────────────────┘
│ │ │
┌──────────▼─────────────────▼─────────────────────▼──────────────────┐
│ DATA / ERP LAYER │
│ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Business Central │ │
│ │ │ │
│ │ ┌────────┐ ┌────────────┐ ┌──────────┐ ┌─────────┐ │ │
│ │ │ APIs │ │ Dataverse │ │ Events │ │ Pages │ │ │
│ │ │ (OData)│ │ (Virtual) │ │ (Webhook)│ │ (AL) │ │ │
│ │ └────────┘ └────────────┘ └──────────┘ └─────────┘ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ Azure Blob │ │ Dataverse │ │ Microsoft Fabric │ │
│ │ Storage │ │ (Tables) │ │ (Lakehouse) │ │
│ └──────────────┘ └──────────────┘ └──────────────────────┘ │
└──────────────────────────────────────────────────────────────────────┘
powerplatform-bc-integration-patterns/
│
├── README.md ← You are here
│
├── docs/
│ ├── flexapi-design.md ← FlexAPI: configurable BC API layer
│ ├── bc-connector-patterns.md ← Power Automate ↔ BC connection guide
│ ├── canvas-app-bc-pattern.md ← Power Apps Canvas App ↔ BC integration
│ ├── azure-function-middleware.md ← Azure Function as BC middleware
│ └── authentication-guide.md ← Azure AD / Entra ID auth patterns
│
├── samples/
│ ├── power-automate/
│ │ ├── bc-purchase-approval.json ← Purchase order approval flow
│ │ └── bc-document-to-blob.json ← BC document → Azure Blob flow
│ ├── power-apps/
│ │ └── purchase-request-schema.json ← Canvas App data schema
│ └── flexapi-sample-response.json ← FlexAPI endpoint response sample
│
├── templates/
│ ├── bc-integration-checklist.md ← Pre-deployment checklist
│ ├── api-endpoint-catalog.json ← Standard BC API endpoints reference
│ └── error-handling-patterns.md ← Error handling & retry patterns
│
└── diagrams/
└── integration-patterns.md ← Mermaid diagrams for all patterns
Problem: BC's standard OData APIs return too much data, require complex filtering, and are hard to consume from Power BI / Fabric.
Solution: A custom BC extension (AL) that exposes a configurable API layer — clients define which entities and fields to expose, with built-in pagination and filtering.
Power BI / Fabric
│
▼
FlexAPI (BC Extension)
│
├── /api/flex/v1/sales-orders?$top=1000&$filter=postingDate gt 2024-01-01
├── /api/flex/v1/customers?$select=no,name,balance
└── /api/flex/v1/gl-entries?$filter=documentType eq 'Invoice'
│
▼
Business Central OData
See → docs/flexapi-design.md
Problem: Staff need to submit purchase requests, but BC licences are expensive (AUD $100+/user/month). Not every staff member needs ERP access.
Solution: Power Apps Canvas App → Dataverse → Power Automate → BC API. Staff use a free Canvas App; only the approval flow writes back to BC.
Staff (no BC licence)
│
▼
Canvas App (Power Apps)
│
▼
Dataverse (store request)
│
▼
Power Automate (approval)
│
▼
BC API (create purchase order)
See → docs/canvas-app-bc-pattern.md
Problem: BC stores documents (invoices, receipts, contracts) inside the ERP. Extracting them for AI processing or archiving requires manual work.
Solution: BC extension triggers on document posting → Azure Function uploads to Blob → Document Intelligence processes → results write back to BC.
BC (document posted)
│
▼
Azure Function (webhook)
│
▼
Azure Blob Storage
│
▼
Document Intelligence (AI)
│
▼
BC API (update record with extracted data)
See → docs/azure-function-middleware.md
Problem: BC reporting is limited to built-in reports and basic Power BI. Enterprise analytics needs a proper data platform.
Solution: FlexAPI exposes BC data → Fabric Data Pipeline ingests → Lakehouse stores → DirectLake serves Power BI.
Business Central
│
▼
FlexAPI (optimised endpoints)
│
▼
Fabric Data Pipeline (scheduled)
│
▼
Lakehouse (Bronze → Silver → Gold)
│
▼
Power BI (DirectLake)
See → fabric-lakehouse-architecture repo for the Lakehouse patterns.
- Open
samples/power-automate/for flow definition samples - Review
docs/bc-connector-patterns.mdfor connection setup - Import flow JSON into your Power Automate environment
- Review
docs/canvas-app-bc-pattern.mdfor the architecture - Use
samples/power-apps/purchase-request-schema.jsonas Dataverse schema template - Build Canvas App connecting to the schema
- Read
docs/flexapi-design.mdfor API design principles - Review
samples/flexapi-sample-response.jsonfor response format - Deploy AL extension to BC sandbox for testing
| Decision | Choice | Rationale |
|---|---|---|
| BC → Power Platform | Dataverse as intermediary | Decouples apps from BC directly; better offline support |
| Authentication | Azure AD app registration | Service-to-service; no user credentials stored |
| Document storage | Azure Blob (not BC) | Lower cost, AI-accessible, scalable |
| Reporting | FlexAPI → Fabric → DirectLake | Avoids overloading BC with report queries |
| Error handling | Retry with exponential backoff | BC API has rate limits; blind retry causes cascading failures |
| Canvas App licensing | Power Apps per-app plan | AUD $8/user/month vs BC licence AUD $100+/user/month |
| Layer | Technology | Purpose |
|---|---|---|
| ERP | Business Central | Core business data |
| API | FlexAPI (AL Extension) | Configurable data exposure |
| Apps | Power Apps (Canvas) | User interface for non-BC users |
| Automation | Power Automate | Workflow, approvals, integration |
| Storage | Azure Blob Storage | Document archive & AI processing |
| Middleware | Azure Functions (C# / Python) | Webhook handling, document sync |
| Data Platform | Microsoft Fabric | Enterprise analytics |
| Reporting | Power BI (DirectLake) | Business intelligence |
| Identity | Microsoft Entra ID | Authentication & authorisation |
| Data Store | Dataverse | Structured data for Power Apps |
Built and maintained by Hung Nguyen — Microsoft Fabric & Power Platform Architect based in Brisbane, Australia.
- 🎓 Certified: PL-600 | DP-600 | DP-700 | PL-300 | PL-200 | AI-102
- 🌐 Portfolio
- 📺 MaiTechNote — Microsoft Power Apps micro-tutorials
MIT License — free to use, adapt, and share with attribution.