Power Apps Canvas Consumer¶
A pattern for building Power Apps Canvas applications that consume data from Microsoft Fabric, trigger Translytical Task Flows, and integrate with Dataverse via OneLake shortcuts.
Architecture¶
flowchart TB
subgraph Power Platform
PA[Canvas App]
CC[Custom Connector]
PA2[Power Automate Flow]
end
subgraph Microsoft Fabric
SQL[SQL Endpoint]
LH[Lakehouse / Gold Layer]
PIPE[Data Pipeline]
TF[Translytical Task Flow]
end
subgraph Dataverse
DV[Dataverse Tables]
SC[OneLake Shortcut]
end
PA -- "1. Gallery / Form" --> CC
CC -- "2. SQL query" --> SQL
SQL -- "3. Read gold tables" --> LH
PA -- "4. Button click" --> PA2
PA2 -- "5. REST API" --> PIPE
PIPE -- "6. Orchestrate" --> TF
DV -- "7. Shortcut" --> SC
SC -- "8. OneLake files" --> LH Overview¶
This guide walks through three integration patterns for consuming Fabric data in a Power Apps Canvas app:
- Custom Connector to Fabric SQL Endpoint -- Query gold-layer tables directly from galleries, charts, and forms.
- Translytical Task Flow Trigger -- Let business users kick off Fabric pipelines from a button in the app.
- Dataverse + OneLake Shortcuts -- Sync Fabric data into Dataverse for offline and relational use cases.
Pattern 1: Custom Connector to Fabric SQL Endpoint¶
Prerequisites¶
- A Fabric Lakehouse with the SQL analytics endpoint enabled.
- An Entra ID app registration with
SQLEndpoint.Readdelegated permission. - Power Apps Premium license (custom connectors require Premium).
Step 1: Create the Custom Connector¶
- Go to Power Apps > Custom Connectors > New custom connector > Create from blank.
- Set the Host to your Fabric SQL endpoint hostname:
- Under Security, choose OAuth 2.0 with these settings:
| Field | Value |
|---|---|
| Identity provider | Azure Active Directory |
| Client ID | <your-app-client-id> |
| Client secret | <your-app-client-secret> |
| Resource URL | https://database.windows.net/ |
| Scope | https://database.windows.net/.default |
- Under Definition, create an action:
Action: GetSlotPerformance
| Property | Value |
|---|---|
| Operation ID | GetSlotPerformance |
| Verb | POST |
| URL | /v1.0/ |
| Body | SQL query string |
Request body schema:
{
"query": "SELECT TOP 1000 machine_id, casino_name, denomination, coin_in, coin_out, actual_hold_pct FROM gold_slot_performance WHERE play_date >= @startDate"
}
- Define the response schema by importing a sample response from the SQL endpoint.
- Create connector and test the connection.
Step 2: Build the Gallery¶
- Insert a Vertical Gallery on the main screen.
- Set the gallery
Itemsproperty:ClearCollect( colSlotData, FabricConnector.GetSlotPerformance({ query: "SELECT TOP 500 machine_id, casino_name, denomination, coin_in, coin_out, actual_hold_pct FROM gold_slot_performance WHERE play_date >= '" & Text(dpStartDate.SelectedDate, "yyyy-mm-dd") & "' ORDER BY coin_in DESC" }).value ); colSlotData - Add labels bound to
ThisItem.machine_id,ThisItem.casino_name, etc.
Step 3: Add Filter Controls¶
- Insert a Date Picker (
dpStartDate) and a Dropdown (ddCasino). - Populate the dropdown:
- Update the gallery filter:
Delegation Considerations¶
Power Apps delegation limits default to 500 rows (configurable up to 2,000). For datasets exceeding this limit:
- Push filtering to the SQL query rather than using client-side
Filter()orSearch()functions. - Use
ClearCollectto fetch pre-filtered results from the connector. - For very large datasets, implement server-side pagination with
OFFSET/FETCH NEXTin the SQL query. - Consider caching results in a Dataverse table for instant gallery binding with full delegation support.
Pattern 2: Translytical Task Flow Integration¶
Translytical Task Flows let you define multi-step data operations (ingest, transform, publish) as a single callable unit. Triggering them from Power Apps gives business users self-service data refresh.
Step 1: Create a Power Automate Flow¶
- In Power Automate, create an Instant cloud flow triggered by PowerApps (V2).
- Add an HTTP action to call the Fabric REST API:
| Field | Value |
|---|---|
| Method | POST |
| URI | https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items/{pipelineId}/jobs/instances?jobType=Pipeline |
| Authentication | Managed Identity or OAuth (see below) |
| Headers | Content-Type: application/json |
- Add a Do Until loop that polls the job status:
GET https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items/{pipelineId}/jobs/instances/{runId}
Loop until body('GetJobStatus')['status'] equals Completed or Failed.
- Add a Respond to a PowerApp or flow action returning the final status.
Step 2: Wire Up the Canvas App¶
- Add a Button labeled "Refresh Data Pipeline".
- Set the
OnSelectproperty: - Add a loading spinner bound to a
varIsRunningvariable.
Authentication for Fabric REST API¶
| Method | When to Use |
|---|---|
| Managed Identity | Flow runs in Azure (Logic Apps, Functions) |
| Service Principal | Automated / unattended scenarios |
| Delegated (user) | User-context execution; honors RLS |
For Power Automate, the simplest approach is a service principal connection reference with Fabric.ReadWrite.All application permission.
Pattern 3: Dataverse + OneLake Shortcuts¶
OneLake shortcuts allow Dataverse to reference Fabric Lakehouse files without copying data. This enables:
- Gallery binding with full delegation (Dataverse supports delegation natively).
- Offline mode for mobile apps.
- Relational joins between Dataverse entities and Fabric data.
Step 1: Create a OneLake Shortcut in Dataverse¶
- In the Power Platform admin center, go to **Environments > [your env]
OneLake shortcuts**.
- Select New shortcut and choose the Fabric Lakehouse.
- Pick the Delta table (e.g.,
gold_slot_performance). - Dataverse creates a virtual table backed by OneLake.
Step 2: Bind the Canvas App¶
- Add a Dataverse data source in the Canvas app.
- Set a gallery
Itemsto: - Delegation works natively because Dataverse handles query push-down.
Sync Considerations¶
| Scenario | Approach |
|---|---|
| Near-real-time | Use Fabric Mirroring to keep Dataverse in sync |
| Batch (daily) | Schedule a pipeline to refresh the shortcut |
| On-demand | Trigger via Pattern 2 (Task Flow button) |
Complete App Layout¶
Screen: HomeScreen
Header: "Casino Operations Dashboard"
KPI Cards:
- Total Coin-In (SUM from connector)
- Net Revenue (SUM coin_in - coin_out)
- Active Machines (COUNTROWS)
- Avg Hold % (AVERAGE)
Gallery: Top 10 machines by coin_in
Button: "Refresh Pipeline" (Pattern 2)
Screen: DetailScreen
Form: Machine details (from gallery selection)
Chart: 7-day coin-in trend (line chart component)
Screen: SettingsScreen
Date range picker
Casino selector
Denomination filter
Connection status indicator
Error Handling¶
// Wrap connector calls in IfError
IfError(
ClearCollect(
colSlotData,
FabricConnector.GetSlotPerformance({query: varQuery}).value
),
Notify(
"Unable to connect to Fabric: " & FirstError.Message,
NotificationType.Error
);
// Fall back to cached Dataverse data
ClearCollect(colSlotData, 'gold_slot_performance_cache')
)
Security Considerations¶
- Custom connectors use OAuth delegated auth; users see only data they have access to in Fabric (respects workspace RBAC).
- Dataverse shortcuts inherit Dataverse security roles.
- Pipeline triggers via Power Automate should use a service account with minimal Fabric permissions.
- Audit connector usage via the Power Platform admin center analytics.
Limitations¶
| Limitation | Workaround |
|---|---|
| Delegation limit (2,000 rows max) | Push filters to SQL; use Dataverse virtual tables |
| No DirectQuery from Canvas apps | Cache results in collections or Dataverse |
| Custom connector requires Premium | Use Dataverse virtual tables as a non-Premium alternative |
| No real-time streaming in Canvas | Use Power BI embedded for live dashboards |