In this Article:
Overview:
The Power BI Admin Team needs to complete the following prerequisites and test the specified APIs. Once these steps are successfully completed, then you can proceed with configuring a Power BI connection in DvSum.
Refer to Configure Microsoft Power BI as a Source for details on creating and configuring the source in DvSum.
Prerequisites
Before proceeding to test API, please ensure the following prerequisites are completed:
- Set up metadata scanning. Refer to Microsoft article: Metadata Scanning Setup.
- Create relevant Entra App. Refer to Microsoft article: Embed Power BI content with service principal and an application secret.
API Testing from Power BI Admin
1. Authentication Token Acquisition
- Endpoint:
POST https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token- Request Body:
{
"client_id": "<client-id>",
"scope": "https://analysis.windows.net/powerbi/api/.default",
"grant_type": "client_credentials",
"client_secret": "<client_secret>"
}
- Request Body:
- Expected Response:
- Status Code: 200 OK (indicates successful connection)
- Response Body:
{
"token_type": "Bearer",
"expires_in": 3599,
"ext_expires_in": 3599,
"access_token": "<token>"
}
2. Test Connection - Retrieve Workspaces using Auth token Generated in Step 1
- Endpoint:
GET https://api.powerbi.com/v1.0/myorg/admin/reports?$filter={$filter} - Reference: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/groups-get-groups-as-admin
- Supported Filters: "Personal", "PersonalGroup", "Workspace"
3. Scanning APIs using Auth token Generated in Step 1
The following APIs will be used during the scanning process:
- Workspace Information Request:
POST https://api.powerbi.com/v1.0/myorg/admin/workspaces/getInfo?lineage={lineage}&datasourceDetails={datasourceDetails}&datasetSchema={datasetSchema}&datasetExpressions={datasetExpressions}&getArtifactUsers={getArtifactUsers}
Documentation: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/workspace-info-post-workspace-info - Scan Status Check:
GET https://api.powerbi.com/v1.0/myorg/admin/workspaces/scanStatus/{scanId}
Documentation: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/workspace-info-get-scan-status - Scan Results Retrieval:
GET https://api.powerbi.com/v1.0/myorg/admin/workspaces/scanResult/{scanId}
Documentation: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/workspace-info-get-scan-result
0 Comments