MSBA-353 · Lesson 2 of 12 · 20 min
Integration with Power Platform
▶ Video coming soon A video version of this lesson is on the way.
Not every integration at Corbel & Finch needed AL. When Dovrin Mwangi-Ross described how green coffee arrives at the roastery, Noor sketched three possible builds on a whiteboard. Sacks come off a truck, someone checks the importer's paperwork against the purchase order, takes a moisture reading and a smell test from a sample, photographs any torn sacks, and decides whether the lot goes to a cool bin or to QUARANTINE. Today that happens on a clipboard. "We could build a page in AL, we could build a Power App, or we could buy something," she said. "The question is who maintains it and where the data has to end up." This lesson looks at the Power Platform side of Business Central: the connector, flows, apps, Dataverse, reporting and agents, and how AL developers support them.
The Power Platform around Business Central
The Power Platform is Microsoft's family of low-code tools: Power Automate for workflows, Power Apps for custom apps, Power BI for reporting, Power Pages for external websites, Copilot Studio for agents, and Dataverse as the shared data platform underneath many of them. Business Central connects to all of them, mostly through the same API pages and queries from lesson 1. That is the first thing an AL developer should take from this lesson: a well-designed custom API serves Power Platform makers as much as it serves the web shop.
| Tool | Connects through | Typical Corbel & Finch use |
|---|---|---|
| Power Automate | Business Central connector and in-product Automate actions | Notify Dovrin when a green coffee purchase order is released; approval reminders |
| Power Apps | Business Central connector (custom and standard APIs) | Green coffee intake app on a roastery tablet |
| Power BI | Business Central connector for Power BI (OData, API pages and queries) | Bettina's sales-by-café report |
| Power Pages | Dataverse virtual tables | Possible future wholesale customer portal |
| Copilot Studio | Business Central connector and the MCP server | Not planned for go-live |
The Business Central connector
The Dynamics 365 Business Central connector is used by Power Automate, Power Apps, Azure Logic Apps and Copilot Studio. A maker signs in, chooses an environment and a company, and then picks an API category: the standard APIs or any custom API set identified by its publisher, group and version. That is why Noor's quarrystone/roastery/v1.0 APIs appear in the connector automatically once the extension is installed. Callum, who would maintain the flows, saw the custom entities beside customers and items with no further setup.
The connector offers triggers that start a flow when a record is created, changed or deleted, and actions to find, get, create, update and delete records and to run bound actions. The record triggers are built on the webhooks described in lesson 1, so the same rules apply: they work only for resources that support webhooks, and a change to more than 1,000 records within the 30-second window produces a collection notification that the connector cannot process, so the flow does not run. A nightly import that touches every item will therefore not fire a "when an item is changed" flow, which surprised more than one partner before it was documented.
Connections run with the identity of whoever created them, or of a service account if the flow uses one. For a business process that must outlive any single employee, Noor recommended a dedicated licensed service user owning the connections, with only the permission sets the flows need, rather than flows quietly running as Callum.
Power Automate inside Business Central
Business Central also surfaces Power Automate in its own pages. On many list and card pages, an Automate action group lets users run instant flows that receive the selected record, and create new flows from templates. Business Central ships approval templates for documents, journals and master data that use Power Automate approvals as an alternative to the built-in approval workflows from MSBA-150. Administrators can control whether users see Power Automate flows on the Automate action, and environments must be linked to a Power Platform environment for the integration to work smoothly.
Worked problem
A flow when a green coffee order is released
Imogen, who manages green-coffee contracts, releases purchase orders to importers. Dovrin wants a Teams message with the expected receipt date and sacks for each released green coffee order. How should the flow be built?
Show solution
- The trigger needs an event that fires on release. A record-changed trigger on purchase orders fires on every edit, not only release, so the flow would need to check the status field and ignore other changes.
- A cleaner option is a business event (see below) raised when a purchase document is released, which the flow can use as its trigger.
- The flow gets the purchase order lines through the connector, filters to items in the GREEN category, and sums the quantities in sacks.
- It posts a Teams message to the roastery channel with the vendor, expected receipt date and total sacks.
Answer: Trigger on a release event rather than on every change, read the lines through the connector, and post a summary to Teams.
Business events
Business events are a newer way for Business Central to tell external systems that something meaningful happened, such as "sales invoice posted" or "customer blocked", rather than merely that a row changed. They are in preview on Microsoft Learn. A built-in catalogue includes events such as sales invoice posted, purchase receipt posted, customer blocked and sales order released. Developers add their own with the ExternalBusinessEvent attribute on an empty procedure, optionally a RequiredPermissions attribute, and an event subscriber that calls the procedure when the underlying AL event fires.
enumextension 50050 "CFR Event Category" extends EventCategory
{
value(50050; "CFR Roastery") { Caption = 'Roastery'; }
}
codeunit 50051 "CFR Business Events"
{
[ExternalBusinessEvent('greenlotquarantined', 'Green coffee lot quarantined', 'Raised when an intake check sends a lot to quarantine', EventCategory::"CFR Roastery")]
[RequiredPermissions(PermissionObjectType::TableData, Database::"CFR Green Intake Check", 'R')]
procedure GreenLotQuarantined(intakeCheckId: Guid; itemNo: Code[20]; lotNo: Code[50]; reason: Text)
begin
end;
[EventSubscriber(ObjectType::Table, Database::"CFR Green Intake Check", 'OnAfterValidateEvent', 'Decision', false, false)]
local procedure RaiseWhenQuarantined(var Rec: Record "CFR Green Intake Check")
begin
if Rec.Decision = Rec.Decision::Quarantine then
GreenLotQuarantined(Rec.SystemId, Rec."Item No.", Rec."Lot No.", Rec."Reason");
end;
}Business events are delivered only after the transaction commits, so a posting that fails and rolls back sends nothing, which is exactly what a subscriber wants. In Power Automate they arrive through Dataverse: the maker uses the Dataverse trigger for when an action is performed, chooses the Dynamics 365 Business Central catalogue, a category and the event. Systems outside Dataverse subscribe through a runtime API that lists event definitions and accepts subscriptions with a notification URL, much like webhooks. Translations and versioning of business events are not yet supported, and Power Automate subscriptions cannot be limited to one company. Because the feature is in preview, Noor used it in CONFIG for the quarantine alert but kept a record-trigger fallback ready for production.
Power Apps on Business Central data
For the green coffee intake, Noor and Callum chose a canvas app in Power Apps. Dovrin's team needed a tablet screen with big buttons, the camera for photos of damaged sacks, and offline-tolerant forms; those are Power Apps strengths and awkward in the Business Central client. The data, however, had to live in Business Central, next to the lot numbers and purchase receipts it describes, so that quarantine decisions show up in item tracing.
The split of work followed. Noor added a table, CFR Green Intake Check, to the extension, with the purchase order, item, lot, moisture reading, aroma check, photo media, decision and reason, and a custom API page over it with DelayedInsert = true so the app could create records. Callum built the canvas app against that API through the connector. The app looks up open purchase receipts for the day, lets the checker pick a lot, and posts the check. Because validation lives in the table's AL triggers, the app cannot store a moisture reading outside the agreed range or quarantine a lot without a reason, however the screen is designed.
| Concern | Where it lives | Why |
|---|---|---|
| Data and validation | AL table and API page in the extension | Same rules for every caller; included in backups and item tracing |
| Screens and camera | Canvas app | Tablet-friendly, built and changed by Callum without a code release |
| Notifications | Power Automate flow on the quarantine business event | Teams alert to Dovrin and Imogen |
| Permissions | Business Central permission set CFR-INTAKE | Checkers can create checks but not post receipts |
Each app user needs a Business Central licence that covers the operations the app performs, because the connector acts as that user. Creating intake checks in a custom table is within what the Team Member licence allows in principle, but Noor checked the specific operations against the licensing guide rather than assuming, and recorded the answer in the project file.
Dataverse: virtual tables and synchronization
Dataverse is the data platform behind model-driven Power Apps, Dynamics 365 Sales and Customer Service, and Power Pages. Business Central can meet it in two ways. Virtual tables make Business Central API data appear in Dataverse without copying it; reads and writes go to Business Central live. They require the Business Central Virtual Table app in the Power Platform environment and the Dataverse connection set up in Business Central. Synchronization copies data between Business Central tables and Dataverse tables on a schedule, with integration table mappings and couplings between records, and is mainly used with Dynamics 365 Sales.
Corbel & Finch uses neither at go-live, but the possible wholesale portal for café customers would most likely be a Power Pages site reading orders and invoices through virtual tables, letting external users see their own data without each needing a Business Central licence. Noor noted it as a 2027 option for Bettina, with the warning that every virtual table is still backed by an API page, so the AL design from lesson 1 matters there too.
Power BI
Power BI reads Business Central through its own connector, which uses OData: API pages, API queries, and UI pages or queries published as web services. Microsoft also publishes Power BI apps for finance, sales, purchasing and inventory. Bettina's report used the API query from lesson 1 so that aggregation happened on the server. Business Central pages can embed Power BI reports in parts, so the same report appears on Bettina's role centre. The performance lesson again: a Power BI refresh that reads every value entry every hour can compete with users for resources, and API queries with read-only intent reduce that.
Copilot Studio and the MCP server
The newest door is for agents. Copilot Studio agents can use the Business Central connector, and the Business Central MCP server implements the Model Context Protocol so that AI clients, including Copilot Studio, GitHub Copilot in Visual Studio Code and other MCP clients, can discover and call Business Central APIs. Its default configuration offers read-only discovery of the API pages and queries the signed-in user may use; administrators can create configurations that allow specific API pages and queries to create, modify, delete and run actions. Every call runs under the user's own identity and permissions, so the audit trail shows who did what. Microsoft has said it plans to charge for MCP tools, with details to follow.
For an AL developer, the lesson is the same as for Power Apps: whatever an agent can do through MCP, it does through API pages and queries. Clear captions, sensible field names, validation in AL and tight permission sets are what keep an agent from doing something surprising. Corbel & Finch has no agent plans before go-live, and Callum filed the MCP server alongside the Payables Agent review planned for March 2027.
Environments, solutions and governance
Power Platform work needs the same discipline as AL work, or the flows become the new clipboard. Noor proposed three rules that Bettina approved for the project. First, environments match: each Business Central environment that flows talk to has a matching Power Platform environment, so a flow built against CONFIG is never accidentally pointed at PROD, and the TRAINING environment gets its own copies for classes. Second, everything lives in a solution: flows, the canvas app and their connection references are packaged in a Power Platform solution, which can be exported from the development environment and imported into production as a managed solution, so production changes are deployed rather than edited by hand. Third, connections are owned by the service user, as described above, and connection references let each environment use its own connection without editing the flow.
Data loss prevention policies in the Power Platform admin center group connectors into business and non-business categories and stop a single flow from mixing them. Corbel & Finch's tenant administrator placed the Business Central, Dataverse, Teams and Outlook connectors in the business group and blocked consumer storage and social media connectors from that group, so nobody can build a flow that copies customer lists to a personal file service. Policies are set per environment or tenant-wide, and Callum learned to check them first when a maker reports that a connector "is missing".
| Business Central environment | Power Platform environment | What runs there |
|---|---|---|
| CONFIG | CF-Config | Flow and app development, unmanaged solution |
| TRAINING | CF-Training | Copies for staff classes, test data only |
| PROD | CF-Production | Managed solution imported after testing |
Finally, someone has to watch the flows. A flow that fails at 2 a.m. emails its owner, and if the owner is a service account nobody reads, the failure goes unnoticed. Callum set the service account's mail to forward to a shared roastery-systems mailbox and added a weekly look at the flow run history to his Monday routine, next to the cash flow forecast from MSBA-350.
Common mistakes
MistakeBuilding business validation only in a canvas app's formulas.
InsteadPut validation in AL table triggers so every caller obeys the same rules.
MistakeExpecting a record-changed trigger to fire after a bulk import of thousands of records.
InsteadRemember that more than 1,000 changes in 30 seconds produce a collection notification the connector cannot process.
MistakeRunning business-critical flows under a personal account.
InsteadUse a dedicated service user with only the needed permission sets.
MistakeTreating business events as generally available.
InsteadCheck their preview status and keep a fallback for production.
MistakeForgetting that the connector acts as a licensed user.
InsteadCheck that each app user's licence covers the operations the app performs.
Summary and key terms
- The Business Central connector serves Power Automate, Power Apps, Logic Apps and Copilot Studio, and lists standard and custom APIs by category.
- Record triggers use webhooks and share their limits; business events (preview) signal meaningful actions after commit.
- Power Apps suit tablet and camera-heavy screens, with data and validation kept in AL tables and API pages.
- Dataverse meets Business Central through virtual tables or synchronization with couplings.
- Power BI reads OData from API pages, API queries and published pages; API queries move aggregation to the server.
- The MCP server lets AI clients use Business Central APIs under the user's own permissions.
- Business Central connector
- The Power Platform connector that reads and writes Business Central data through its APIs.
- API category
- The publisher, group and version a maker chooses in the connector to reach a set of APIs.
- Business event
- A notification that a meaningful business action occurred, delivered after commit (preview).
- Virtual table
- A Dataverse table that reads and writes Business Central data live without copying it.
- Coupling
- A link between a Business Central record and a Dataverse record used in synchronization.
- MCP server
- The Business Central server for the Model Context Protocol, used by AI clients to call APIs.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Why did Noor put the intake check validation in AL rather than in the canvas app?
Show answer
So every caller, including future apps, flows and agents, obeys the same rules, and the data sits with the lots it describes.
How does a maker reach Noor's custom API in Power Automate?
Show answer
By choosing the quarrystone/roastery/v1.0 API category in the Business Central connector.
When is a business event delivered?
Show answer
After the transaction that raised it commits; a rolled-back transaction sends nothing.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.