-
Notifications
You must be signed in to change notification settings - Fork 0
PBI Admin API Reference
Base URL:
https://api.powerbi.com/v1.0/myorg/admin/Auth: Bearer token β Service Principal (client_credentials) or delegated user with Power BI Administrator role Key Requirement: Fabric Admin Portal β Tenant settings β Admin API settings β "Service principals can access read-only admin APIs" must be enabled for SP auth to reach/admin/endpoints.
| Auth Method | Requirements | Notes |
|---|---|---|
| Service Principal | Entra App Registration + Tenant.Read.All PBI scope + Admin API gate enabled |
Best for automation |
| Interactive (delegated) | Power BI Administrator Entra role + MicrosoftPowerBIMgmt module |
Ad-hoc / dev use |
| ROPC (service account) | Power BI Administrator role + no MFA + "Allow public client flows" on app reg | Unattended fallback when SP auth is blocked at PBI service layer |
| Fabric Administrator role | Entra ID role assignment on the SP | Alternate to the Admin API tenant setting; grants access directly |
Endpoint: GET /admin/groups
| Field / Expand | Details |
|---|---|
id |
Workspace GUID |
name |
Display name (null for personal workspaces) |
type |
PersonalGroup | Workspace | Group
|
state |
Active | Deleted | Removing
|
isReadOnly |
Boolean |
isOnDedicatedCapacity |
true for Premium / Fabric |
capacityId |
GUID of the assigned capacity (Premium / Fabric only) |
storageUsed |
Storage in MB β populated for Premium / Fabric only; null for shared |
defaultDatasetStorageFormat |
Small | Large
|
$expand=reports |
Inline report list per workspace |
$expand=datasets |
Inline dataset list per workspace |
$expand=dashboards |
Inline dashboard list |
$expand=dataflows |
Inline dataflow list |
$expand=users |
Workspace members and their roles |
$top |
Max page size 5,000 |
What you cannot get here: Dataset memory consumption, per-report performance metrics, query timings.
Endpoints:
-
GET /admin/reportsβ all reports across the tenant -
GET /admin/groups/{groupId}/reportsβ reports in a specific workspace
| Field | Details |
|---|---|
id |
Report GUID |
name |
Display name |
webUrl |
Browser URL to open the report |
embedUrl |
Embed URL |
datasetId |
Backing dataset GUID |
createdDateTime |
ISO 8601 timestamp |
modifiedDateTime |
ISO 8601 timestamp |
reportType |
PowerBIReport | PaginatedReport | ExcelWorkbook
|
What you cannot get here: Per-report memory, render time, query duration, page-level metrics. Those require XMLA or Log Analytics.
Endpoints:
-
GET /admin/datasetsβ all datasets across the tenant -
GET /admin/groups/{groupId}/datasetsβ datasets in a workspace -
GET /admin/datasets/{datasetId}/usersβ dataset user permissions
| Field | Details |
|---|---|
id |
Dataset GUID |
name |
Display name |
configuredBy |
Owner UPN |
targetStorageMode |
Import (in-memory) | DirectQuery | Streaming | CompositeModel
|
isRefreshable |
Boolean β can it be refreshed via API |
addRowsAPIEnabled |
Boolean β Push dataset |
isOnPremGatewayRequired |
Boolean |
isEffectiveIdentityRequired |
Boolean β RLS required |
schemaRetrievalError |
Population error if schema could not be read |
upstreamDatasets |
Parent dataset references (chained datasets) |
contentProviderType |
RealTime | None etc. |
Refresh History: GET /datasets/{datasetId}/refreshes
| Field | Details |
|---|---|
refreshType |
Scheduled | OnDemand | ViaEnhancedApi
|
startTime |
ISO 8601 |
endTime |
ISO 8601 |
status |
Completed | Failed | Unknown
|
serviceExceptionJson |
Error detail on failure |
Size / Memory:
targetStorageModeis the best REST proxy βImport= dataset loaded into Analysis Services memory. Actual byte-level memory is not in the REST API; requires XMLA DMV queries (Premium / Fabric only) or Azure Log Analytics.
Endpoints:
-
GET /admin/dashboardsβ all dashboards across the tenant -
GET /admin/groups/{groupId}/dashboardsβ dashboards in a workspace -
GET /admin/dashboards/{dashboardId}/tilesβ tiles on a dashboard
| Field | Details |
|---|---|
id |
Dashboard GUID |
displayName |
Display name |
embedUrl |
Embed URL |
isReadOnly |
Boolean |
users |
Via $expand=users
|
tiles[].reportId |
Backing report GUID (if from a report) |
tiles[].datasetId |
Backing dataset GUID |
Endpoints:
-
GET /admin/dataflowsβ all dataflows across the tenant -
GET /admin/groups/{groupId}/dataflowsβ dataflows in a workspace -
GET /admin/dataflows/{dataflowId}/usersβ dataflow permissions -
GET /admin/dataflows/{dataflowId}/datasourcesβ data sources used
| Field | Details |
|---|---|
objectId |
Dataflow GUID |
name |
Display name |
configuredBy |
Owner UPN |
modifiedDateTime |
Last modified timestamp |
description |
Description text |
datasourceUsages |
Source connection references |
Endpoint: GET /admin/activityevents?startDateTime=...&endDateTime=...
- Scoped to one UTC day per call β loop day-by-day for multi-day windows
- Standard audit log retention: 30 days (Fabric / Premium may extend this)
- Filters via
$filter=Activity eq 'ViewReport'(or other activity type)
| Activity | Description |
|---|---|
ViewReport |
User opened a report |
ExportReport |
User exported a report |
ViewDashboard |
User opened a dashboard |
ShareReport |
Report was shared |
PublishToWorkspace |
Report published |
CreateReport |
Report created |
DeleteReport |
Report deleted |
RefreshDataset |
Dataset refresh triggered |
ExportDataflow |
Dataflow exported |
CreateApp |
App created |
InstallApp |
App installed |
ViewApp |
App opened |
| Field | Details |
|---|---|
Id |
Event GUID |
RecordType |
Numeric record type |
CreationTime |
ISO 8601 UTC |
Operation |
Activity name (ViewReport etc.) |
UserId |
UPN of the acting user |
ReportId |
GUID of the report (ViewReport events) |
ReportName |
Display name |
WorkspaceId |
Workspace GUID |
WorkspaceName |
Workspace display name |
ArtifactId |
Generic artifact GUID (same as ReportId for reports) |
ArtifactName |
Generic artifact name |
ArtifactKind |
Report | Dashboard | Dataset etc. |
ClientIP |
Client IP address |
UserAgent |
Client user agent string β use this to infer device type |
ConsumptionMethod |
Present on newer / Fabric tenants (OnDemand etc.) |
IsSuccess |
Boolean |
RequestId |
Correlation GUID |
DatasetId |
Backing dataset GUID (where applicable) |
ReportType |
PowerBIReport | PaginatedReport
|
DistributionMethod |
Workspace | App | Adhoc
|
MobileDeviceModel |
Populated for mobile clients |
ClientTypeis NOT a field in this API. It belongs to the Unified Audit Log (M365 compliance center) format. UseConsumptionMethodfirst, then parseUserAgent.
Endpoints:
-
GET /admin/groups/{groupId}/usersβ workspace members -
GET /admin/reports/{reportId}/usersβ report-level permissions -
GET /admin/datasets/{datasetId}/usersβ dataset permissions -
GET /admin/dashboards/{dashboardId}/usersβ dashboard permissions -
GET /admin/apps/{appId}/usersβ app subscribers
| Field | Details |
|---|---|
emailAddress |
User UPN |
displayName |
Display name |
groupUserAccessRight |
Admin | Contributor | Member | Viewer
|
principalType |
User | Group | App
|
identifier |
Object ID |
Endpoints:
-
GET /admin/capacitiesβ all capacities in the tenant -
PATCH /admin/capacities/{capacityId}/AssignWorkspacesβ assign workspaces -
POST /admin/capacities/{capacityId}/UnassignWorkspacesβ unassign workspaces
| Field | Details |
|---|---|
id |
Capacity GUID |
displayName |
Display name |
sku |
SKU name (P1, F64 etc.) |
state |
Active | Inactive
|
region |
Azure region string |
admins |
Capacity administrator UPNs |
Memory metrics (utilization %, throttling, artifact memory) are not in the REST API. They are only accessible via the Fabric Capacity Metrics app or Azure Log Analytics.
Endpoints:
-
GET /admin/appsβ all published apps in the tenant -
GET /admin/apps/{appId}/usersβ app subscribers
| Field | Details |
|---|---|
id |
App GUID |
name |
App name |
publishedBy |
Publisher UPN |
lastUpdate |
Last published timestamp |
description |
Description |
workspaceId |
Source workspace |
Endpoints:
-
GET /gatewaysβ gateways the calling user administers -
GET /gateways/{gatewayId}/datasourcesβ data sources on the gateway
| Field | Details |
|---|---|
id |
Gateway GUID |
name |
Gateway display name |
type |
Resource (on-prem) | Personal
|
gatewayStatus |
Live | Unknown
|
gatewayAnnotation |
JSON blob with version, machine name, OS |
publicKey |
RSA public key for credential encryption |
Datasources: datasourceType
|
Sql | SharePoint | Exchange etc. |
Datasources: connectionDetails
|
JSON with server/database |
The Scanner API performs deep tenant-wide scans and returns schema-level metadata not available through the standard endpoints.
Workflow:
-
POST /admin/workspaces/getInfoβ initiate scan (pass workspace ID list orlineage=true,datasetSchema=true) -
GET /admin/workspaces/scanStatus/{scanId}β poll untilstatus = Succeeded -
GET /admin/workspaces/scanResult/{scanId}β retrieve full results
| Category | Fields |
|---|---|
| Dataset tables | Table name, row count estimate, storage mode per table |
| Dataset columns | Column name, data type, encoding, summarization |
| Dataset measures | DAX expression, table |
| Dataset relationships | From/to table+column, cardinality, cross-filter |
| Dataset datasources | Connection type, server, database, path |
| Report pages | Page name, display option, visuals |
| Report visuals | Visual type, title, dataset fields used |
| Sensitivity labels | Label ID, label name (if MIP integration enabled) |
| Endorsement |
Certified | Promoted | None
|
| Upstream datasets | Lineage chain |
Still not available via Scanner: Byte-level memory consumption, query timings, render durations.
Endpoints:
-
GET /pipelinesβ pipelines the calling user can see -
GET /pipelines/{pipelineId}/stagesβ Dev / Test / Prod stages -
GET /pipelines/{pipelineId}/stages/{stageOrder}/artifactsβ artifacts per stage
| Field | Details |
|---|---|
id |
Pipeline GUID |
displayName |
Pipeline name |
Stages: order
|
0 = Dev, 1 = Test, 2 = Prod |
Stages: workspaceId
|
Linked workspace GUID |
Artifacts: artifactType
|
Report | Dataset | Dashboard | Dataflow
|
| Metric | Where to get it instead |
|---|---|
| Dataset memory consumption (MB) | XMLA endpoint DMV: DISCOVER_OBJECT_MEMORY_USAGE (Premium / Fabric only) |
| Per-table storage size | XMLA endpoint DMV: DISCOVER_STORAGE_TABLES
|
| Query duration / render time | Azure Log Analytics (PowerBIActivity table) or Fabric Capacity Metrics app |
| CPU / throttling per dataset | Fabric Capacity Metrics app (internal APIs, not public) |
| Row-level data in datasets | Not accessible β Admin APIs are metadata only |
| Real-time streaming data | Not accessible via REST |
| Purview / data catalog lineage | Microsoft Purview API (separate) |
| Teams / SharePoint embed telemetry | M365 Usage Analytics (separate Graph reports) |
All list endpoints use OData-style pagination. Two patterns exist:
| Pattern | Endpoints | How to paginate |
|---|---|---|
odata.nextLink |
reports, datasets, users, apps
|
Follow the odata.nextLink URL |
continuationUri + continuationToken
|
activityevents |
Use continuationUri (fully formed URL) β do not reconstruct from continuationToken + original params |
$top / $skip
|
groups (workspaces) |
$top=5000 is the max for groups |
| Limit | Value |
|---|---|
| Admin API calls per hour | ~200 requests (approx β varies by endpoint and tenant load) |
| Activity events calls per day | 1 call per day-range per token |
429 Too Many Requests |
Honour the Retry-After response header (usually 60s) |
| Scanner API | 1 active scan at a time per tenant |
# Base headers for all calls
$headers = @{ Authorization = "Bearer $token"; "Content-Type" = "application/json" }
# Workspaces with reports + datasets expanded (max page = 5000)
$uri = "https://api.powerbi.com/v1.0/myorg/admin/groups?`$expand=reports,datasets&`$top=5000"
# Activity events β single day
$start = "'2026-04-01T00:00:00.000Z'"
$end = "'2026-04-01T23:59:59.999Z'"
$uri = "https://api.powerbi.com/v1.0/myorg/admin/activityevents?startDateTime=$start&endDateTime=$end"
# Scanner β initiate full tenant scan with schema
$body = '{ "workspaces": [], "lineage": true, "datasetSchema": true, "datasetExpressions": true }'
$scan = Invoke-RestMethod -Uri ".../admin/workspaces/getInfo?lineage=true&datasetSchema=true" `
-Method POST -Headers $headers -Body $bodyLast updated: 2026-04-03 | Managed Solution β Will Ford API reference: Microsoft Power BI REST API docs
- Overview
- Start-LyncCsvExporter
- Get-ComprehensiveLyncReport
- Get-LyncHealthReport
- Get-LyncInfrastructureReport
- Get-LyncServiceStatus
- Get-LyncUserRegistrationReport
- Export-ADLyncTeamsMigrationData
- New-Office365Accounts
- Sync-ContactsFromCsv
- Set-EmailToSharedAccount
- Set-SMTPForward
- Invoke-UserSignOutAndBlock
- Security Assessment Scripts (coming soon)
- Azure Automation (documentation pending)
- Get-GraphToken
- Get-GraphHeaders
- Get-AzureResourcePaging
- Get-EnterpriseAppUsage
- Get-ExchangeErrorsGraph
- Get-PBIWorkspaceUsageReport
- Intune Management (documentation pending)