Microsoft Power BI Component
Interact with and modify Power BI datasets
Component key: ms-power-bi
Description
Microsoft Power BI is a business intelligence and data visualization service from Microsoft. This component allows you to manage datasets, create and delete rows, update table schemas, and list groups, reports, and tables within Power BI.
API Documentation
This component was built using the Microsoft Power BI REST API currently utilizing v1.0.
Connections
OAuth 2.0
The Microsoft Power BI component authenticates requests through the Microsoft Graph API using OAuth 2.0.
Prerequisites
- A Microsoft Azure account with access to the Azure Portal
- Appropriate permissions to register applications in Azure Active Directory
Setup Steps
To create an OAuth 2.0 application for Power BI:
- Navigate to the Azure Portal and sign in
- Select Azure Active Directory from the menu
- Click App registrations and then New registration
- Configure the application:
- Enter a name for the application
- Choose the appropriate Supported account types (single tenant or multi-tenant)
- Under Redirect URI, select Web and enter:
https://oauth2.prismatic.io/callback
- Click Register to create the application
- After registration, locate and copy the Application (client) ID from the Overview page
- Navigate to Certificates & secrets in the left menu
- Click New client secret, provide a description and expiration period, then click Add
- Copy the Value of the newly created client secret immediately (it will not be shown again)
- Navigate to API permissions in the left menu
- Click Add a permission and select Power BI Service
- Select Delegated permissions and choose the appropriate scopes based on the integration requirements
- Ensure the
offline_accessscope is included to maintain the OAuth connection and receive refresh tokens
For detailed instructions, refer to Microsoft's documentation on registering Power BI apps.
Configure the Connection
Configure the OAuth 2.0 connection with the following values:
- Client ID: Enter the Application (client) ID from the Azure Portal
- Client Secret: Enter the Value of the client secret created in step 9
- Scopes: Add the Power BI scopes configured in step 12. Refer to the Microsoft Graph API permissions reference for available options. The
offline_accessscope is essential for maintaining the connection - Authorize URL and Token URL:
- For single-tenant apps: Use the tenant-specific endpoints that include the Azure Tenant ID
- For multi-tenant apps: Use the
commonendpoints (default configuration)
The OAuth endpoints depend on the tenant configuration. Single-tenant applications require the Azure Tenant ID in the authorization and token URLs. Multi-tenant applications can use the common endpoints. Consult Microsoft's authentication documentation for details.
The offline_access scope must be included in the app registration. Without this scope, users will need to re-authenticate every hour when the access token expires.
Verify Connection
After configuring the connection, test the authentication by executing a Power BI action. Refer to the Microsoft Power BI REST API documentation for available API operations and endpoints.
| Input | Notes | Example |
|---|---|---|
| Authorize URL | The OAuth 2.0 Authorization URL. Use tenant-specific endpoint for single-tenant apps: https://login.microsoftonline.com/{TENANT-ID}/oauth2/authorize | https://login.microsoftonline.com/common/oauth2/authorize |
| Client ID | The Application (client) ID from the Azure Portal. Navigate to Azure Active Directory > App registrations to find this value. | 12345678-1234-1234-1234-123456789abc |
| Client Secret | The Client Secret from the Azure Portal. Navigate to Certificates & secrets to generate a new client secret. | |
| Scopes | Space-separated list of Power BI OAuth scopes. Must include 'offline_access' for refresh tokens. See https://docs.microsoft.com/en-us/graph/permissions-reference for available scopes. | https://analysis.windows.net/powerbi/api/Dataset.ReadWrite.All offline_access |
| Token URL | The OAuth 2.0 Token URL. Use tenant-specific endpoint for single-tenant apps: https://login.microsoftonline.com/{TENANT-ID}/oauth2/v2.0/token | https://login.microsoftonline.com/common/oauth2/v2.0/token |
Data Sources
Select Dataset
Select a dataset from your Power BI workspace | key: selectDataset | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection |
Select Table
Select a table from a dataset | key: selectTable | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Dataset ID | The unique identifier of the dataset. A dataset is a collection of tables that can be used to generate reports and visuals in Power BI. Datasets must be 'Push' datasets to be accessible via API. | cfafbeb1-8037-4d0c-896e-a46fb27ff229 |
Select Workspace
Select a workspace from your Power BI account | key: selectWorkspace | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection |
Actions
Create Dataset
Creates a new dataset on 'My Workspace' | key: createDataset
| Input | Notes | Example |
|---|---|---|
| Columns | An array of column definitions that define the table schema. Each column must have a name and dataType. Supported data types: Int64, Double, Boolean, DateTime, String, Decimal. | |
| Connection | ||
| Dataset Name | The name for the new dataset to create. | SalesDataset |
| Table Name | The name of the table within the dataset. | SalesData |
{
"data": {
"id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
"name": "SalesDataset",
"defaultRetentionPolicy": "basicFIFO",
"addRowsAPIEnabled": true,
"configuredBy": "john.doe@example.com",
"isRefreshable": false,
"isEffectiveIdentityRequired": false,
"isEffectiveIdentityRolesRequired": false,
"isOnPremGatewayRequired": false,
"description": "Sales and marketing metrics dataset",
"createdDate": "2024-01-15T10:30:00Z",
"webUrl": "https://app.powerbi.com/groups/me/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229",
"targetStorageMode": "Push"
}
}
Create Rows
Adds new data rows to the specified table within the specified dataset from 'My Workspace' | key: createRow
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Dataset ID | The unique identifier of the dataset. A dataset is a collection of tables that can be used to generate reports and visuals in Power BI. Datasets must be 'Push' datasets to be accessible via API. | cfafbeb1-8037-4d0c-896e-a46fb27ff229 |
| Rows | An array of row objects to insert into the table. Each object should contain key-value pairs matching the table's column names. | |
| Table Name | The name of the table within the dataset. | SalesData |
{
"data": {}
}
Delete Rows
Deletes all rows from the specified table within the specified dataset from 'My Workspace' | key: deleteRows
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Dataset ID | The unique identifier of the dataset. A dataset is a collection of tables that can be used to generate reports and visuals in Power BI. Datasets must be 'Push' datasets to be accessible via API. | cfafbeb1-8037-4d0c-896e-a46fb27ff229 |
| Table Name | The name of the table within the dataset. | SalesData |
{
"data": {}
}
List Datasets
Returns a list of datasets from 'My Workspace' | key: listDatasets
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Page Offset | The number of entries to skip for pagination. Used to retrieve results beyond the first page. | 100 |
| Top | The maximum number of results to return. Must be a value between 1 and 1000. | 100 |
{
"data": {
"@odata.context": "https://api.powerbi.com/v1.0/myorg/$metadata#datasets",
"value": [
{
"id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
"name": "SalesDataset",
"addRowsAPIEnabled": true,
"configuredBy": "john.doe@example.com",
"isRefreshable": false,
"isEffectiveIdentityRequired": false,
"isEffectiveIdentityRolesRequired": false,
"isOnPremGatewayRequired": false,
"description": "Sales and marketing metrics dataset",
"createdDate": "2024-01-15T10:30:00Z",
"webUrl": "https://app.powerbi.com/groups/me/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229",
"targetStorageMode": "Push"
},
{
"id": "d92e3c1b-5f41-4e2d-9a8c-b7f2e1c3d4a5",
"name": "FinanceData",
"addRowsAPIEnabled": false,
"configuredBy": "jane.smith@example.com",
"isRefreshable": true,
"isEffectiveIdentityRequired": true,
"isEffectiveIdentityRolesRequired": true,
"isOnPremGatewayRequired": true,
"description": "Financial reporting dataset",
"createdDate": "2024-02-20T14:45:00Z",
"webUrl": "https://app.powerbi.com/groups/me/datasets/d92e3c1b-5f41-4e2d-9a8c-b7f2e1c3d4a5",
"targetStorageMode": "DirectQuery"
}
]
}
}
List Groups
Returns a list of workspaces the user has access to | key: listGroups
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Page Offset | The number of entries to skip for pagination. Used to retrieve results beyond the first page. | 100 |
| Top | The maximum number of results to return. Must be a value between 1 and 1000. | 100 |
{
"data": {
"@odata.context": "https://api.powerbi.com/v1.0/myorg/$metadata#groups",
"value": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Sales and Marketing",
"isReadOnly": false,
"isOnDedicatedCapacity": true,
"capacityId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"defaultDatasetStorageFormat": "Small",
"dataflowStorageId": null
},
{
"id": "b3c4d5e6-f7a8-9012-cdef-123456789012",
"name": "Finance Workspace",
"isReadOnly": false,
"isOnDedicatedCapacity": false,
"capacityId": null,
"defaultDatasetStorageFormat": "Small",
"dataflowStorageId": null
},
{
"id": "c4d5e6f7-a890-1234-defg-234567890123",
"name": "Engineering Team",
"isReadOnly": true,
"isOnDedicatedCapacity": true,
"capacityId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"defaultDatasetStorageFormat": "Large",
"dataflowStorageId": "d5e6f7a8-9012-3456-efgh-345678901234"
}
]
}
}
List Reports
Returns a list of reports from 'My Workspace' | key: listReports
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Page Offset | The number of entries to skip for pagination. Used to retrieve results beyond the first page. | 100 |
| Top | The maximum number of results to return. Must be a value between 1 and 1000. | 100 |
{
"data": {
"@odata.context": "https://api.powerbi.com/v1.0/myorg/$metadata#reports",
"value": [
{
"datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
"id": "e1f2a3b4-c5d6-7890-efab-cd1234567890",
"name": "Sales Performance Report",
"webUrl": "https://app.powerbi.com/groups/me/reports/e1f2a3b4-c5d6-7890-efab-cd1234567890",
"embedUrl": "https://app.powerbi.com/reportEmbed?reportId=e1f2a3b4-c5d6-7890-efab-cd1234567890",
"appId": null,
"description": "Monthly sales performance metrics and KPIs",
"isOwnedByMe": true,
"originalReportId": null,
"reportType": "PowerBIReport",
"subscriptions": [],
"users": []
},
{
"datasetId": "d92e3c1b-5f41-4e2d-9a8c-b7f2e1c3d4a5",
"id": "f2a3b4c5-d6e7-8901-fabc-de2345678901",
"name": "Financial Summary",
"webUrl": "https://app.powerbi.com/groups/me/reports/f2a3b4c5-d6e7-8901-fabc-de2345678901",
"embedUrl": "https://app.powerbi.com/reportEmbed?reportId=f2a3b4c5-d6e7-8901-fabc-de2345678901",
"appId": "12345678-90ab-cdef-1234-567890abcdef",
"description": "Quarterly financial reporting",
"isOwnedByMe": false,
"originalReportId": "a3b4c5d6-e7f8-9012-abcd-ef3456789012",
"reportType": "PowerBIReport",
"subscriptions": [],
"users": []
},
{
"datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
"id": "a4b5c6d7-e8f9-0123-bcde-f34567890123",
"name": "Inventory Report",
"webUrl": "https://app.powerbi.com/groups/me/reports/a4b5c6d7-e8f9-0123-bcde-f34567890123",
"embedUrl": "https://app.powerbi.com/reportEmbed?reportId=a4b5c6d7-e8f9-0123-bcde-f34567890123",
"appId": null,
"description": null,
"isOwnedByMe": true,
"originalReportId": null,
"reportType": "PaginatedReport",
"subscriptions": [],
"users": []
}
]
}
}
List Tables
Returns a list of tables tables within the specified dataset from 'My Workspace' | key: listTables
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Dataset ID | The unique identifier of the dataset. A dataset is a collection of tables that can be used to generate reports and visuals in Power BI. Datasets must be 'Push' datasets to be accessible via API. | cfafbeb1-8037-4d0c-896e-a46fb27ff229 |
| Page Offset | The number of entries to skip for pagination. Used to retrieve results beyond the first page. | 100 |
| Top | The maximum number of results to return. Must be a value between 1 and 1000. | 100 |
{
"data": {
"@odata.context": "https://api.powerbi.com/v1.0/myorg/$metadata#datasets('cfafbeb1-8037-4d0c-896e-a46fb27ff229')/tables",
"value": [
{
"name": "SalesData",
"description": "Sales transaction data",
"isHidden": false,
"columns": [
{
"name": "ProductID",
"dataType": "Int64",
"dataCategory": null,
"formatString": null,
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "None"
},
{
"name": "Name",
"dataType": "String",
"dataCategory": null,
"formatString": null,
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "None"
},
{
"name": "Category",
"dataType": "String",
"dataCategory": null,
"formatString": null,
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "None"
},
{
"name": "IsComplete",
"dataType": "Boolean",
"dataCategory": null,
"formatString": null,
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "None"
},
{
"name": "ManufacturedOn",
"dataType": "DateTime",
"dataCategory": null,
"formatString": "yyyy-MM-dd",
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "None"
},
{
"name": "Sales",
"dataType": "Int64",
"dataCategory": null,
"formatString": "Currency",
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "Sum"
}
],
"measures": [],
"rows": [],
"source": []
},
{
"name": "Customers",
"description": "Customer information",
"isHidden": false,
"columns": [
{
"name": "CustomerID",
"dataType": "Int64",
"dataCategory": null,
"formatString": null,
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "None"
},
{
"name": "CustomerName",
"dataType": "String",
"dataCategory": null,
"formatString": null,
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "None"
},
{
"name": "Email",
"dataType": "String",
"dataCategory": null,
"formatString": null,
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "None"
}
],
"measures": [],
"rows": [],
"source": []
}
]
}
}
Raw Request
Send raw HTTP request to Microsoft Power BI | key: rawRequest
| Input | Notes | Example |
|---|---|---|
| Connection | ||
| Data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} |
| Debug Request | Enabling this flag will log out the current request. | false |
| File Data | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] |
| File Data File Names | File names to apply to the file data inputs. Keys must match the file data keys above. | |
| Form Data | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] |
| Header | A list of headers to send with the request. | User-Agent: curl/7.64.1 |
| Max Retry Count | The maximum number of retries to attempt. Specify 0 for no retries. | 0 |
| Method | The HTTP method to use. | |
| Query Parameter | A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2. | |
| Response Type | The type of data you expect in the response. You can request json, text, or binary data. | json |
| Retry On All Errors | If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors. | false |
| Retry Delay (ms) | The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled. | 0 |
| Timeout | The maximum time that a client will await a response to its request | 2000 |
| URL | Input the path only (/profiles), The base URL is already included (https://api.powerbi.com/v1.0/myorg). For example, to connect to https://api.powerbi.com/v1.0/myorg/profiles, only /profiles is entered in this field. | /profiles |
| Use Exponential Backoff | Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored. | false |
Update Table
Updates the metadata and schema for the specified table within the specified dataset from 'My Workspace' | key: updateTable
| Input | Notes | Example |
|---|---|---|
| Columns | An array of column definitions that define the table schema. Each column must have a name and dataType. Supported data types: Int64, Double, Boolean, DateTime, String, Decimal. | |
| Connection | ||
| Dataset ID | The unique identifier of the dataset. A dataset is a collection of tables that can be used to generate reports and visuals in Power BI. Datasets must be 'Push' datasets to be accessible via API. | cfafbeb1-8037-4d0c-896e-a46fb27ff229 |
| Table Name | The name of the table within the dataset. | SalesData |
{
"data": {
"name": "SalesData",
"description": "Updated sales transaction data",
"isHidden": false,
"columns": [
{
"name": "ProductID",
"dataType": "Int64",
"dataCategory": null,
"formatString": null,
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "None"
},
{
"name": "Name",
"dataType": "String",
"dataCategory": null,
"formatString": null,
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "None"
},
{
"name": "Category",
"dataType": "String",
"dataCategory": null,
"formatString": null,
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "None"
},
{
"name": "IsComplete",
"dataType": "Boolean",
"dataCategory": null,
"formatString": null,
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "None"
},
{
"name": "ManufacturedOn",
"dataType": "DateTime",
"dataCategory": null,
"formatString": "yyyy-MM-dd",
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "None"
},
{
"name": "Sales",
"dataType": "Int64",
"dataCategory": null,
"formatString": "Currency",
"isHidden": false,
"sortByColumn": null,
"summarizeBy": "Sum"
}
],
"measures": [],
"rows": [],
"source": []
}
}
Changelog
2025-10-29
Added inline data sources for workspaces, datasets, and tables with pagination support.