Microsoft Power BI ExecModule
Overview
PowerBiModule lists the shared Power BI workspaces available to a saved Microsoft Entra application and the reports within a selected workspace. Use the returned IDs to maintain a report catalog, check that expected reports are present after a release, or record which semantic model a report references when Power BI provides the dataset ID.
Usage
- Set up a Microsoft Entra service principal and give it access to the shared workspaces the workflow needs.
- Choose Microsoft Power BI in the Integration Account Console. Save the tenant ID, application client ID, and client secret in the connection.
- Add a Microsoft Power BI step in Workflow Studio and select the saved account under General > Connection.
- Run List Workspaces, then pass a workspace ID to List Reports. Check
statusandtruncatedbefore using the report list as an inventory.
Inputs
| Input | Type | Purpose |
|---|---|---|
operation | string | list_workspaces (default) or list_reports. |
workspaceId | string | Workspace UUID required for list_reports. |
limit | integer | Maximum rows to return, from 1 to 1,000. Defaults to 100. |
offset | integer | Number of workspace rows to skip, from 0 to 1,000,000. Defaults to 0. Applies only to list_workspaces. |
Outputs
| Output | Type | Meaning |
|---|---|---|
status | string | success or error. |
workspaces | array | Workspace summaries with id, name, isReadOnly, and isOnDedicatedCapacity when provided. |
reports | array | Report summaries with id, name, and optional reportType and datasetId. Paginated reports can have no dataset ID. |
count | integer | Number of rows returned by the step. |
nextOffset | integer | Workspace continuation hint when a page reaches the limit and the next offset is within bounds. |
truncated | boolean | Whether list_reports returned fewer rows than Power BI supplied because of the configured limit. |
httpStatus | integer | Provider HTTP status when available. |
error | object | Sanitized code, message, and retryable flag. May include retryAfterSeconds when supplied by the provider. |
IntegrationAccount Requirements
Use an authorized READY IntegrationAccount named POWER_BI. Set accountId to the Entra tenant ID, username to the application client ID, and the protected password field to the client secret value. Use UUIDs for both IDs. Keep the secret in the saved connection so workflow inputs can contain only the operation and lookup parameters.
Have a Power BI administrator allow service principals to call the Power BI APIs, preferably for a dedicated security group that contains this application's service principal. Add the principal or its group to the intended shared workspaces. Microsoft documents the Member role for workspace access in its service principal setup. The connector uses app-only authentication, where Power BI authorizes access through tenant settings and workspace membership. Microsoft service principal setup
Configuration
The saved tenant identifies the token endpoint at login.microsoftonline.com. The connector requests a Power BI access token for https://analysis.windows.net/powerbi/api/.default and uses it only at api.powerbi.com. Requests use fixed HTTPS destinations in the commercial cloud. The client secret and access token stay out of workflow outputs.
Operations
- List Workspaces returns one page of shared workspaces visible to the service principal. Use the workspace IDs to identify which reports to check. Microsoft Get Groups reference
- List Reports returns report metadata from one workspace. Standard reports can include a dataset ID that identifies the underlying semantic model. Paginated reports can still be inventoried without that ID. Microsoft Get Reports In Group reference
Errors and Failure Modes
| Condition | What to check |
|---|---|
| Invalid input | Check the operation, UUID, and numeric bounds. |
| Connection unavailable | Select a ready POWER_BI connection you can use and check the three credential fields. |
| Token rejected | Check the tenant ID, client ID, and whether the secret has expired. |
| Power BI HTTP 401, 403, or 404 | Check service principal API access in the tenant, workspace membership, and whether the workspace still exists. New permissions can take time to appear. |
| HTTP 429 or a transient service error | Check retryable and honor retryAfterSeconds when present. |
| Oversized provider response | Workspace and report responses are bounded to 2 MiB and token responses to 32 KiB. Reduce the workspace page size when listing workspaces. The report limit applies after Power BI returns its workspace-wide response. |
Example
After a reporting release, a finance team checks that its month-end report is still present in the workspace it uses for close. The workflow finds the workspace with list_workspaces, then passes its ID to the report inventory step.
{
"operation": "list_reports",
"workspaceId": "9c6dbfab-639e-4139-bf2b-4bd3c46afbc6",
"limit": 100
}
An example successful response includes the stable report ID and the dataset ID when Power BI supplies it.
{
"status": "success",
"httpStatus": 200,
"reports": [
{
"id": "76d8ce88-511d-46b8-90bc-b5a037d1f2f8",
"name": "Month-End Close",
"reportType": "PowerBIReport",
"datasetId": "c7f61582-726c-47cc-a417-26386988009f"
}
],
"count": 1,
"truncated": false
}
The next step compares the result with the report ID the team expects. Check that the list is complete before raising a missing-report alert.
Notes
- Pagination. Pass
nextOffsetasoffsetwith the samelimitto continue workspace discovery. A full page can be the last page, and membership changes during a scan can shift results. Power BI does not provide a report page offset for this operation. Increaselimitwithin its bounds if the report list is truncated. - Rate limits. Keep scheduled inventory reads spaced out. Use the reported retry guidance to back off when Power BI throttles requests.
- API limits. The connector inventories shared workspaces and report metadata. Personal My Workspace, DAX queries, report exports, and refresh operations are outside its scope.
- Idempotency and destructive behavior. Both operations read metadata and leave workspaces, reports, and semantic models unchanged. Results can change as content and permissions change in Power BI.
- Provider verification. Before scheduling, run each operation once with your authorized tenant connection and confirm the expected workspace and report IDs.