Enterprise Power Automate deployments routinely bleed budget through misassigned licenses, under-provisioned capacity packs, and zero visibility into which flows are consuming what. This lesson gives you a complete operating model: how API request metering actually works, how to track per-flow consumption using admin APIs, how to assign Per-Flow licenses programmatically at scale, and how to build a chargeback model that holds business units accountable.

Your finance team just got hit with a $40,000 overage bill. Twelve Power Automate flows were hammering the SharePoint Premium connector through a single Pay-as-you-go environment, and nobody had any idea how many API requests they were burning through collectively. The CoE toolkit report showed 2.3 million requests consumed in a single month against a budgeted 500,000. Sound familiar?
This scenario plays out constantly in organizations that grew their Power Automate footprint organically — a few citizen developers here, a CoE project there, and suddenly you have 400 flows across 8 environments with licensing that's equal parts guess, legacy decisions, and wishful thinking. The seams show when Microsoft's licensing model is applied strictly: flows touching premium connectors need either a Per-Flow plan or the maker needs a Per-User Premium license, API request consumption rolls up against tenant-level capacity, and high-volume flows running on shared capacity will throttle themselves into uselessness or burn through prepaid API request packs at alarming speed.
By the end of this lesson, you'll have a complete operating model for licensing and capacity assignment at scale. We'll cover the mechanics of how Power Platform counts and enforces API requests, how to build a data pipeline that tracks per-flow consumption from admin APIs, how to assign Per-Flow licenses programmatically, how to map high-volume flows to dedicated Power Platform capacity units, and how to structure a chargeback model that holds business units accountable for the capacity they consume.
What you'll learn:
You should have hands-on experience managing Power Platform environments in an enterprise context. Specifically, you need:
Microsoft.PowerApps.Administration.PowerShell moduleBefore you can rightsize anything, you need an accurate mental model of what gets counted, what doesn't, and how the platform enforces limits. Most organizations have a dangerously vague understanding of this — they know there's "a limit" but couldn't tell you what triggers it.
Every time a flow action executes — whether it's sending an HTTP request, reading a row from Dataverse, calling an Office 365 connector, or triggering a child flow — the platform increments a counter associated with the license context of the flow's owner or the Per-Flow license assigned to the flow itself.
The count operates at a per 24-hour rolling window basis, not a calendar month. Microsoft uses a 24-hour sliding window, resetting continuously rather than at midnight UTC. This matters enormously for burst traffic patterns: a flow that processes 50,000 records in a single batch job starting at 11pm will burn through its daily allocation and then face throttling before the batch completes, even if it's well within its "monthly" budget.
Key insight
The 24-hour window is rolling, not fixed. If your high-volume batch runs between 10pm and 2am and your daily allocation is 40,000 requests, the first 40,000 actions succeed, and then the platform begins returning 429 Too Many Requests on subsequent connector calls. The flow doesn't fail immediately — it queues retries — but throughput collapses. Plan batch windows around this window, not calendar days.
The request allocation per license type breaks down as follows (as of 2024; always verify against the current licensing guide because these numbers have shifted):
The implications are stark. A single Per-User Premium license running 10 flows that together execute 150,000 actions per day is in breach. A single Per-Flow license at 250,000 requests/day is sufficient for most production automation scenarios. If you have a flow that needs 600,000+ requests per day, you need multiple Per-Flow licenses assigned to it, plus potentially API request capacity packs.
This is where misunderstandings compound. Not every action in your flow is an API request against your quota. Here's the actual breakdown:
Actions that count:
Actions that do NOT count:
The practical implication: an Apply to Each over 10,000 items that calls SharePoint inside the loop generates 10,000 counted API requests from that single connector call pattern. Add a Compose inside the loop, and the Composes don't add to your count. Add a second connector action inside the loop, and now you're at 20,000. This is why implementing batching and chunking strategies has direct licensing cost implications, not just performance ones.
Warning
Child flows consume API requests against the parent flow's license context, not the child flow's own license. If you have a licensed Per-Flow parent spawning 10 child flows that each make 20 connector calls, those 200 connector calls count against the parent's 250,000/day allocation. However, if child flows are themselves independently assigned Per-Flow licenses, they consume against their own allocation. This architecture decision has significant cost implications at scale — read it carefully in the licensing documentation before committing to your child flow orchestration architecture.
Microsoft does not hard-block flows at the moment of limit breach in all cases. The enforcement has three phases:
Understanding consumption theoretically is not enough. You need to pull actual consumption data programmatically, build a consumption baseline per flow, and feed that into your rightsizing decisions. The Power Platform admin APIs expose this data, but the path to extracting it is non-trivial.
First, acquire a bearer token against the Power Platform service. The correct resource URI is https://api.bap.microsoft.com:
# Install if not present
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Force
# Authenticate
Add-PowerAppsAccount -TenantID "your-tenant-id"
# Or use MSAL for service principal auth in automated pipelines
$clientId = "your-sp-client-id"
$clientSecret = "your-sp-secret"
$tenantId = "your-tenant-id"
$tokenEndpoint = "https://login.microsoftonline.com/$tenantId/oauth2/v2.0/token"
$body = @{
client_id = $clientId
client_secret = $clientSecret
scope = "https://api.bap.microsoft.com/.default"
grant_type = "client_credentials"
}
$tokenResponse = Invoke-RestMethod -Method Post -Uri $tokenEndpoint -Body $body
$accessToken = $tokenResponse.access_token
Note
For production consumption tracking pipelines, use a service principal with the Power Platform Service Admin role rather than interactive credentials. This ensures your monitoring flow itself doesn't fail when the authenticating user's session expires. See Service Principals and Application Users for Unattended Power Automate Deployments for the full setup pattern.
The admin API for capacity consumption sits under the BAP (Business Application Platform) endpoint:
# Get all environments with capacity details
$environments = Get-AdminPowerAppEnvironment
foreach ($env in $environments) {
$envId = $env.EnvironmentName
# Get API request consumption for the environment
$capacityUri = "https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments/$envId/capacity?api-version=2021-04-01"
$headers = @{
"Authorization" = "Bearer $accessToken"
"Content-Type" = "application/json"
}
$capacityData = Invoke-RestMethod -Method Get -Uri $capacityUri -Headers $headers
# Extract API request capacity usage
$apiRequestCapacity = $capacityData.value |
Where-Object { $_.capacityType -eq "ApiRequestsCapacity" }
[PSCustomObject]@{
EnvironmentId = $envId
EnvironmentName = $env.DisplayName
AllocatedRequests = $apiRequestCapacity.allocated
ConsumedRequests = $apiRequestCapacity.consumed
OverageRequests = $apiRequestCapacity.overage
}
}
The granular per-flow consumption data requires the Flow admin cmdlets combined with the analytics API. This is where most admins stop — they see environment-level numbers but can't attribute them to individual flows. Here's the approach:
function Get-FlowApiConsumption {
param(
[string]$EnvironmentId,
[string]$AccessToken,
[int]$DaysBack = 30
)
$endDate = (Get-Date).ToString("yyyy-MM-dd")
$startDate = (Get-Date).AddDays(-$DaysBack).ToString("yyyy-MM-dd")
# Get all flows in the environment
$flows = Get-AdminFlow -EnvironmentName $EnvironmentId
$results = @()
foreach ($flow in $flows) {
$flowId = $flow.FlowName
# Query the flow run analytics endpoint
$analyticsUri = "https://api.bap.microsoft.com/providers/Microsoft.ProcessSimple/scopes/admin/environments/$EnvironmentId/flows/$flowId/runs?api-version=2016-11-01&`$filter=startTime ge '$startDate' and startTime le '$endDate'"
$headers = @{
"Authorization" = "Bearer $AccessToken"
}
try {
$runsData = Invoke-RestMethod -Method Get -Uri $analyticsUri -Headers $headers
# Sum action counts across runs - each run contains actionCount
$totalActions = ($runsData.value |
Measure-Object -Property { $_.properties.trigger.startTime } -Sum).Sum
# More accurately, count via run details
$runCount = $runsData.value.Count
$results += [PSCustomObject]@{
FlowId = $flowId
FlowName = $flow.DisplayName
EnvironmentId = $EnvironmentId
Owner = $flow.Internal.properties.creator.userId
RunCount = $runCount
PeriodStart = $startDate
PeriodEnd = $endDate
LicenseType = $flow.Internal.properties.definitionSummary.triggers[0].swaggerOperationId
}
}
catch {
Write-Warning "Could not retrieve runs for flow $flowId : $_"
}
}
return $results
}
The challenge with per-flow action counting is that the run-level API returns run metadata but not always the precise action execution count per run. For the most accurate per-flow action count, you need to pull individual run action details:
function Get-FlowRunActionCount {
param(
[string]$EnvironmentId,
[string]$FlowId,
[string]$RunId,
[string]$AccessToken
)
$actionsUri = "https://api.bap.microsoft.com/providers/Microsoft.ProcessSimple/scopes/admin/environments/$EnvironmentId/flows/$FlowId/runs/$RunId/actions?api-version=2016-11-01"
$headers = @{ "Authorization" = "Bearer $AccessToken" }
$actionsData = Invoke-RestMethod -Method Get -Uri $actionsUri -Headers $headers
# Count only billable action types
$billableActions = $actionsData.value | Where-Object {
# Exclude control flow actions
$_.name -notmatch "^(Condition|Switch|Scope|Apply_to_each|Do_until|Compose|Parse_JSON|Select|Filter_array|Initialize_variable|Set_variable|Append_to_array_variable)$"
}
return [PSCustomObject]@{
RunId = $RunId
TotalActions = $actionsData.value.Count
BillableActions = $billableActions.Count
ActionBreakdown = $billableActions | Group-Object -Property { $_.properties.definition.metadata.operationMetadataId } |
Select-Object Name, Count
}
}
Tip
Building this consumption pipeline as a Power Automate flow itself is elegant but creates a circular dependency — a monitoring flow consuming API requests to track API request consumption. Run the inventory pipeline as a nightly Azure Function or Azure Automation Runbook instead, and feed results to a Dataverse table or Azure SQL database. This separates your observability infrastructure from the systems being observed.
Once you're extracting per-flow data nightly, you need it in a queryable form. Write the results to a Dataverse custom table with this schema:
FlowConsumptionLog:
- flow_id (Text, 100) — PK component
- flow_name (Text, 200)
- environment_id (Text, 100)
- environment_name (Text, 200)
- business_unit (Text, 100) — mapped from environment metadata
- measurement_date (Date Only) — PK component
- run_count (Whole Number)
- billable_action_count (Whole Number)
- license_type (Choice: PerFlow, PerUser, Seeded)
- assigned_capacity (Whole Number)
- overage_flag (Yes/No)
- flow_owner_upn (Text, 200)
With this table populated nightly, a Power BI report built on Dataverse can show:
Manually assigning Per-Flow licenses through the Admin Center UI works for 5 flows. At 500 flows, you need programmatic assignment with governance controls around who can consume these licenses.
A Per-Flow license is a SKU that you purchase from the Microsoft 365 admin center, and each license unit can be assigned to exactly one flow. The assignment is done at the environment level: you navigate to Power Platform Admin Center → Environments → [environment] → Resources → Flows → [flow] → Assign license.
But at scale, you need the API. The licensing assignment API is part of the Graph API, not the BAP API, which surprises many admins.
function Assign-PerFlowLicense {
param(
[string]$TenantId,
[string]$GraphAccessToken,
[string]$EnvironmentId,
[string]$FlowId,
[string]$PerFlowSkuId # The SKU ID for Power Automate Per Flow
)
# Per Flow SKU ID in Microsoft's licensing system
# Commonly: "f30db892-07e9-47e9-837c-80727f46fd3d" but verify in your tenant
# Get it via: GET https://graph.microsoft.com/v1.0/subscribedSkus
$assignUri = "https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments/$EnvironmentId/assignLicense"
$body = @{
flowId = $FlowId
skuId = $PerFlowSkuId
} | ConvertTo-Json
$headers = @{
"Authorization" = "Bearer $GraphAccessToken"
"Content-Type" = "application/json"
}
$result = Invoke-RestMethod -Method Post -Uri $assignUri -Headers $headers -Body $body
return $result
}
# Bulk assignment from a CSV of high-priority flows
$flowsToLicense = Import-Csv "high-volume-flows.csv"
# CSV columns: EnvironmentId, FlowId, BusinessUnit, Justification
foreach ($flow in $flowsToLicense) {
try {
$result = Assign-PerFlowLicense `
-TenantId $tenantId `
-GraphAccessToken $graphToken `
-EnvironmentId $flow.EnvironmentId `
-FlowId $flow.FlowId `
-PerFlowSkuId $perFlowSkuId
Write-Host "Licensed flow $($flow.FlowId) in environment $($flow.EnvironmentId)"
# Log to audit table
# Add-DataverseRow -Table "pa_flow_license_assignments" -Data @{...}
}
catch {
Write-Warning "Failed to license flow $($flow.FlowId): $_"
}
}
License assignment should not be a free-for-all. Build a Power Automate flow that acts as the gatekeeper:
This pattern integrates naturally with your ALM pipeline governance — license assignment should happen as part of environment promotion from UAT to production, not as an afterthought.
Warning
Per-Flow licenses are tenant-scoped but environment-assigned. If you delete the environment or the flow is deleted, the license becomes unassigned and returns to your available pool — but this doesn't happen automatically in real time. Plan a monthly license reclamation sweep: query all assigned Per-Flow licenses, verify the target flow still exists, and unassign orphaned licenses. Orphaned licenses are silent budget leakage.
For flows that genuinely need 250,000+ requests per day — think SAP integration pipelines, nightly data warehouse sync flows, or high-frequency Dataverse change tracking processors — you need to think beyond the Per-Flow license and consider dedicated capacity.
A Power Platform API Request Capacity Add-on pack gives your environment an additional 50,000 requests per day, pooled across all flows running in that environment. These packs are environment-assigned, not flow-assigned, which creates an important design consideration.
If you have 10 flows in an environment, all sharing a pool of 500,000 additional requests from 10 capacity packs, the platform pools them democratically. A single runaway flow can consume the entire pool, starving others. This is why high-volume flows benefit from dedicated environments where the capacity pool is sized specifically for that flow's consumption and not shared with unrelated workloads.
The dedicated environment pattern looks like this:
Tenant Capacity Architecture
├── Shared Production Environment
│ ├── Standard flows (seeded/Per-User licensed)
│ ├── Medium-volume flows (Per-Flow licensed, <100K req/day)
│ └── Capacity pool: 500K req/day (10 packs)
│
├── High-Volume Integration Environment
│ ├── SAP Daily Sync Flow (Per-Flow licensed: 250K/day)
│ ├── Dataverse Delta Sync Flow (Per-Flow licensed: 250K/day)
│ └── Capacity pool: 1M req/day (20 packs) — overflow only
│
└── Nightly Batch Environment
├── Data Warehouse Load Flow (Per-Flow + 3 capacity packs)
├── Invoice Processing Flow (Per-Flow licensed)
└── Capacity pool: 200K req/day (4 packs) — burst buffer
For each high-volume flow, calculate its daily API request consumption using this formula:
Daily_Requests = (Trigger_Runs_Per_Day) × (Actions_Per_Run) × (Billable_Action_Fraction)
Where Billable_Action_Fraction is the proportion of actions that are connector calls vs. free control flow. For well-designed flows doing real integration work, this is typically 0.4–0.7 (40-70% of actions are billable).
Worked example: A flow that syncs Salesforce opportunities to Dataverse:
Daily requests = (96 × 85 × 2) + 96 = 16,320 + 96 = 16,416 requests/day
This flow fits comfortably within a single Per-Flow license's 250,000/day allocation. No capacity packs needed.
Now consider a nightly data warehouse load that processes 500,000 Dataverse records:
Daily requests = 50 (pagination queries) + (500,000 × 3) = 1,500,050 requests/day
This requires 1 Per-Flow license (250K) plus 5 API Request Capacity packs (5 × 50K = 250K) for a total of 500K — wait, that math doesn't work. This flow needs 1.5 million requests/day. That's 6 Per-Flow licenses (6 × 250K = 1.5M) or a rearchitecting conversation. This is exactly the kind of flow where integrating with Azure Functions for the compute-heavy loop processing makes economic sense — offload the 500,000-row iteration to a Durable Function and let Power Automate handle only the orchestration.
Key insight
When a flow's daily API request requirement exceeds 500,000, seriously evaluate whether Power Automate is the right execution engine for the inner loop. Power Automate excels at orchestration, exception handling, and business process integration. For pure data transformation at millions-of-records scale, Azure Data Factory, Synapse Pipelines, or Durable Functions are both cheaper and faster. Use Power Automate to trigger and monitor them, not to do the iteration.
Via PowerShell:
function Set-EnvironmentCapacityAllocation {
param(
[string]$EnvironmentId,
[string]$AccessToken,
[int]$ApiRequestPackCount
)
# Each pack = 50,000 requests/day
$totalRequestsToAllocate = $ApiRequestPackCount * 50000
$uri = "https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments/$EnvironmentId/updateCapacity?api-version=2021-04-01"
$body = @{
capacityType = "ApiRequestsCapacity"
quantity = $totalRequestsToAllocate
allocated = $true
} | ConvertTo-Json
$headers = @{
"Authorization" = "Bearer $AccessToken"
"Content-Type" = "application/json"
}
$result = Invoke-RestMethod -Method Post -Uri $uri -Headers $headers -Body $body
Write-Host "Allocated $ApiRequestPackCount capacity packs ($totalRequestsToAllocate req/day) to environment $EnvironmentId"
return $result
}
# Allocate 10 packs to the high-volume integration environment
Set-EnvironmentCapacityAllocation `
-EnvironmentId "prod-integration-environment-id" `
-AccessToken $accessToken `
-ApiRequestPackCount 10
Tip
The capacity allocation API is eventually consistent. After calling it, wait 2-5 minutes before verifying through the Admin Center UI. If you're building automated provisioning scripts, add a Start-Sleep -Seconds 300 before your verification step to avoid false failures.
Collecting consumption data and assigning licenses reactively is half the battle. The other half is building a systematic rightsizing model — a process that takes your 30-day consumption data and generates actionable license recommendations per business unit.
A rightsizing decision for each flow falls into one of four quadrants based on its daily consumption and current license state:
Current License → Unlicensed / Seeded Per-Flow Assigned
┌─────────────────────┬──────────────────────────┐
High Volume │ CRITICAL: Assign │ REVIEW: Check if single │
(>40K req/day) │ Per-Flow immediately│ license is sufficient │
├─────────────────────┼──────────────────────────┤
Low Volume │ OK: Seeded license │ WASTE: Unassign Per-Flow│
(<40K req/day) │ sufficient │ reclaim the license │
└─────────────────────┴──────────────────────────┘
Build this logic into a PowerShell rightsizing report:
function Get-FlowLicenseRecommendations {
param(
[string]$EnvironmentId,
[string]$AccessToken,
[int]$AnalysisDays = 30,
[int]$HighVolumeThreshold = 40000 # Daily requests
)
# Get all flows with their current license state
$flows = Get-AdminFlow -EnvironmentName $EnvironmentId
$recommendations = @()
foreach ($flow in $flows) {
$flowId = $flow.FlowName
# Get 30-day consumption from your Dataverse table
# (Assumes you've been running the nightly collection pipeline)
$consumptionQuery = @{
filter = "flow_id eq '$flowId' and measurement_date ge $(Get-Date).AddDays(-$AnalysisDays).ToString('yyyy-MM-dd')"
}
# Simplified: use a pre-aggregated value here
$avgDailyRequests = Get-FlowAverageConsumption -FlowId $flowId -Days $AnalysisDays
$peakDailyRequests = Get-FlowPeakConsumption -FlowId $flowId -Days $AnalysisDays
$currentLicense = $flow.Internal.properties.licenseType # "PerFlow", "PerUser", "Seeded"
$isEnabled = $flow.Enabled
$recommendation = switch ($true) {
($avgDailyRequests -gt 200000 -and $currentLicense -ne "PerFlow") {
"CRITICAL: Assign Per-Flow license. Avg consumption $avgDailyRequests exceeds Per-User limits"
}
($avgDailyRequests -gt 40000 -and $currentLicense -ne "PerFlow") {
"RECOMMEND: Assign Per-Flow license. Avg consumption $avgDailyRequests approaching limits"
}
($avgDailyRequests -lt 5000 -and $currentLicense -eq "PerFlow") {
"OPTIMIZE: Unassign Per-Flow license. Avg consumption $avgDailyRequests well within seeded limits. Reclaim license."
}
($peakDailyRequests -gt 230000 -and $currentLicense -eq "PerFlow") {
"REVIEW: Peak consumption $peakDailyRequests approaching Per-Flow limit. Monitor for capacity pack need."
}
default {
"OK: Current license appropriate for consumption level"
}
}
$recommendations += [PSCustomObject]@{
FlowId = $flowId
FlowName = $flow.DisplayName
Owner = $flow.Internal.properties.creator.userId
BusinessUnit = Get-BusinessUnitFromEnvironment -EnvironmentId $EnvironmentId
CurrentLicense = $currentLicense
AvgDailyRequests = $avgDailyRequests
PeakDailyRequests = $peakDailyRequests
IsEnabled = $isEnabled
Recommendation = $recommendation
EstimatedMonthlyCost = Calculate-MonthlyLicenseCost -License $currentLicense -AvgRequests $avgDailyRequests
}
}
return $recommendations | Sort-Object -Property AvgDailyRequests -Descending
}
Once you have per-flow consumption and license assignments, you can build a chargeback model. The key is mapping environments to business units and allocating costs proportionally.
function Get-BusinessUnitChargeback {
param(
[hashtable]$EnvironmentToBUMapping, # @{ "env-id" = "Finance"; "env-id2" = "Operations" }
[decimal]$PerFlowMonthlyCost = 100, # USD per flow per month
[decimal]$CapacityPackMonthlyCost = 50, # USD per 50K requests/day pack per month
[int]$Month,
[int]$Year
)
$chargebackReport = @()
foreach ($envId in $EnvironmentToBUMapping.Keys) {
$bu = $EnvironmentToBUMapping[$envId]
# Count Per-Flow licenses assigned in this environment
$perFlowCount = (Get-AdminFlow -EnvironmentName $envId |
Where-Object { $_.Internal.properties.licenseType -eq "PerFlow" }).Count
# Get capacity packs assigned
$capacityPacks = Get-EnvironmentCapacityPacks -EnvironmentId $envId
# Get total API requests consumed this month
$monthlyConsumption = Get-EnvironmentMonthlyConsumption -EnvironmentId $envId -Month $Month -Year $Year
$perFlowCost = $perFlowCount * $PerFlowMonthlyCost
$capacityCost = $capacityPacks * $CapacityPackMonthlyCost
$totalCost = $perFlowCost + $capacityCost
$chargebackReport += [PSCustomObject]@{
BusinessUnit = $bu
EnvironmentId = $envId
PerFlowLicenses = $perFlowCount
CapacityPacks = $capacityPacks
TotalAPIRequests = $monthlyConsumption
PerFlowCost = $perFlowCost
CapacityPackCost = $capacityCost
TotalMonthlyCost = $totalCost
CostPerKRequests = if ($monthlyConsumption -gt 0) { $totalCost / ($monthlyConsumption / 1000) } else { 0 }
}
}
return $chargebackReport | Sort-Object -Property TotalMonthlyCost -Descending
}
This output feeds directly into a Power BI chargeback dashboard that finance teams and BU leads can consume. The critical feature is the CostPerKRequests column — it normalizes cost across BUs of different sizes and shows which units are getting good value from their automation investment vs. which ones have inefficient flows burning budget unnecessarily.
For more detail on the financial modeling side of this, including AI Builder credits and the nuances of Per-User vs. Per-Flow economics across different flow profiles, the Cost Management at Scale: Per-Flow vs Per-User Licensing, AI Builder Credits, and Chargeback article covers the full picture.
Building the data pipeline is necessary but not sufficient. You need real-time alerting when flows are approaching their limits, not a monthly report that shows last month's overages.
Set up consumption alerts at three thresholds:
The detection mechanism for throttling is tricky because Power Automate doesn't expose a "currently throttled" flag directly. Instead, you detect it indirectly by monitoring flow run duration anomalies — a flow that normally completes in 4 minutes taking 45 minutes is almost certainly being throttled.
The Building a Power Automate Monitoring and Alerting System article covers the infrastructure for this alerting system in full detail. The capacity-specific addition you need is a nightly comparison of estimated vs. actual run duration, flagging anomalies as potential throttling events.
If you're running the CoE Starter Kit (and at this scale, you should be), the toolkit already collects flow run data via its own admin API polling. Augment the CoE's Admin | Sync Template v3 (Flows) flow to also capture:
With this data in the CoE Dataverse tables, the existing CoE Power BI template can be extended with capacity management pages. For comprehensive governance patterns that connect to this, Auditing and Governing Power Automate at Scale is the essential companion.
This exercise walks you through the full rightsizing cycle for a single environment. You'll need Power Platform Service Admin access and at least one environment with active flows.
Setup — 15 minutes:
Install-Module Microsoft.PowerApps.Administration.PowerShellAdd-PowerAppsAccountGet-AdminPowerAppEnvironment | Select EnvironmentName, DisplayName | Format-TableStep 1 — Baseline consumption (20 minutes):
Run the following to get current flow status and approximate consumption:
$envId = "your-environment-id-here"
$flows = Get-AdminFlow -EnvironmentName $envId
# Build a quick inventory
$inventory = $flows | Select-Object `
FlowName,
DisplayName,
@{N="Owner"; E={$_.Internal.properties.creator.userId}},
@{N="State"; E={$_.Internal.properties.state}},
@{N="TriggerType"; E={$_.Internal.properties.definitionSummary.triggers[0].type}},
@{N="Created"; E={$_.Internal.properties.createdTime}}
$inventory | Sort-Object Created -Descending | Format-Table -AutoSize
# Count flows by trigger type to estimate consumption patterns
$inventory | Group-Object TriggerType |
Select-Object Name, Count |
Sort-Object Count -Descending
Step 2 — License gap analysis (15 minutes):
# Check which flows are touching premium connectors (these need licensing)
$premiumFlows = $flows | Where-Object {
$_.Internal.properties.definitionSummary.actions |
Where-Object { $_.swaggerName -in @("shared_salesforce", "shared_sap", "shared_servicebus", "shared_sqlserver") }
}
Write-Host "Flows requiring premium licensing: $($premiumFlows.Count)"
$premiumFlows | Select DisplayName, @{N="Owner"; E={$_.Internal.properties.creator.userId}} | Format-Table
Step 3 — Generate recommendations (10 minutes):
Based on what you've found, manually classify each premium connector flow into:
Document this in a spreadsheet with columns: FlowId, FlowName, Owner, RecommendedAction, BusinessJustification, EstimatedDailyVolume.
Step 4 — Simulate chargeback (10 minutes):
If your organization has multiple environments mapped to different BUs, run the environment-level capacity query for each:
$environments = Get-AdminPowerAppEnvironment
foreach ($env in $environments) {
$flows = Get-AdminFlow -EnvironmentName $env.EnvironmentName
Write-Host "$($env.DisplayName): $($flows.Count) flows, " `
"$($($flows | Where-Object {$_.Enabled}).Count) enabled"
}
Compare flow counts across BU-mapped environments. Identify the top 3 environments by flow count and document the BU owner, number of premium connector flows, and whether they have dedicated capacity packs assigned.
The Per-User plan's 40,000 requests/day pools across ALL flows that user owns. If a user owns 50 flows that each make 1,000 requests/day, that's 50,000/day — over the limit — even though each individual flow looks fine. Admins frequently look at per-flow consumption in isolation and miss the aggregation effect.
Fix: Always look at total consumption aggregated per owner, not per flow, when evaluating Per-User licensed flows.
Disabled flows still hold their Per-Flow license assignment. Organizations routinely have dozens of disabled "archived" flows holding valuable license units.
Fix: Add a step to your monthly license reclamation sweep: Get-AdminFlow -EnvironmentName $envId | Where-Object { -not $_.Enabled } | Where-Object { $_.LicenseType -eq "PerFlow" } — these are your reclamation candidates.
If your dev and test environments are running at similar scale to production — which happens when developers test with production-volume data — they're consuming license capacity from the same pool.
Fix: Restrict Per-Flow license assignment to production environments only. Use seeded licenses or per-user licenses in dev/test, enforce lower data volumes in test datasets, and consider dedicated test environments with minimal capacity. See Testing Power Automate Flows Before Release for practical test environment design.
By the time you see throttling in your monitoring data, it's already affecting users. The polling interval of most monitoring flows (5-15 minutes) means you're always behind.
Fix: For critical high-volume flows, implement a "canary" action at the start of each run that queries the flow's own run history via the admin API and estimates remaining daily capacity before the main processing begins. If remaining capacity is below the expected run cost, trigger an alert before starting processing rather than after hitting the wall.
Teams often buy capacity packs as a reactive fix when throttling occurs. Without a consumption model, they have no idea how many packs to buy, so they over-purchase to be safe.
Fix: Run the 30-day consumption analysis first. Calculate peak daily consumption, add 25% headroom, and size from there. Revisit quarterly as usage evolves.
This almost always means your service principal lacks the Power Platform Service Admin role or the Dynamics 365 Service Admin role. Check in Azure AD that the SP has both:
Power Platform Administrator role in Microsoft 365 Admin CenterSystem Administrator security role in the target Dataverse environment (for environment-scoped operations)Capacity packs take up to 24 hours to fully propagate to enforcement. Additionally, verify the packs are assigned to the correct environment — it's easy to allocate to a secondary environment while your production flows run elsewhere.
# Verify capacity assignment
$uri = "https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments/$envId/capacity?api-version=2021-04-01"
Invoke-RestMethod -Uri $uri -Headers @{"Authorization" = "Bearer $accessToken"} |
ConvertTo-Json -Depth 5
You now have a complete operating model for Power Automate licensing at enterprise scale. The key architecture decisions we've covered:
Where to go next:
The organizations that get this right aren't spending more on Power Automate licensing — they're spending it more precisely. The same budget that was sustaining a chaotic mix of over-licensed low-volume flows and under-licensed high-volume ones can, with this framework, support twice the production automation footprint with better reliability and cleaner cost accountability.
Enterprise Cloud Flows