Forum Discussion
Get Dataset from semantic model in Application insights
- 1 year ago
Hi MarynaBan,
Apologies for the late reply. After reviewing the details you provided, I have identified few workarounds that may help resolve the issue. Please follow these steps:
There is no direct built-in feature in Power BI Service to capture API calls, but you can use the following workarounds to track API requests being sent from Power BI:
As your Power BI model operates in Direct Query mode, you can utilize DAX Studio to capture the executed queries. Using DAX Studio open the application and connect it to your Power BI model. Then, enable query tracing by navigating to the Advanced tab and selecting Enable All Queries under the Tracing section. After enabling this setting, refresh your Power BI report.
SQL Profiler can be utilized to monitor Direct Query activity in Power BI. To start, install SQL Profiler from SQL Server Management Studio. Then, connect to Power BI Desktop's local instance by opening DAX Studio, going to the Advanced tab, and copying the Localhost connection string. Open SQL Server Profiler and connect to this instance. Initiate a new trace and refresh the Power BI report to capture Direct Query requests, enabling effective monitoring of API calls.
SQL Server Profiler - SQL Server Profiler | Microsoft Learn
Since the report is published to Power BI Service, you can review the dataset logs to analyse API activity. Navigate to Power BI Service and select the relevant dataset. Then, go to Settings and check the Data source credentials section for any available API details. If the API details are not visible, you can try extracting logs by accessing the Workspace, clicking on Dataset Refresh History, and reviewing any failed refresh attempts. These failures may provide insights into API call details.
Capture API requests directly from Power BI using Fiddler or browser dev tools. Install Fiddler Classic, then open Fiddler and start capturing network traffic. Open Power BI Desktop and refresh the report. Look for requests to api.applicationinsights.io. Extract the exact API query used. Using Browser Dev Tools for Power BI Service: Open your Power BI Report in a browser. Press F12 to open Developer Tools. Go to the Network tab → Filter for applicationinsights.io. Refresh the report and look for the full API request.If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hi MarynaBan,
I apologize for any inconvenience caused. After reviewing the details you provided, I have outlined the following steps. Please follow the steps below:
Using a semantic model in Power BI, direct access to the original Power Query queries may not be available. However, there are still alternative methods to retrieve the API query.
Power BI logs API calls in the background, and the Performance Analyzer tool can capture these requests. To use it, open Power BI Desktop and navigate to View → Performance Analyzer. Click Start Recording and refresh the report. Look for queries under Direct Query or Query Diagnostics, then expand the query to find a URL. This method allows you to capture the exact API query sent to Application Insights.
Use Performance Analyzer to examine report element performance in Power BI Desktop - Power BI | Microsoft Learn
If your model is in Direct Query mode, DAX Studio can be utilized to trace the queries sent by Power BI. To do this, open DAX Studio and connect it to your Power BI model. Enable "All Queries" in the Tracing section, then refresh the report in Power BI. Look for queries that reference Web.Contents or API URLs. This method is particularly useful when Power BI uses Direct Query to fetch data dynamically.
Direct Query model guidance in Power BI Desktop - Power BI | Microsoft Learn
Direct Query in Power BI - Power BI | Microsoft Learn
If the report is published to the Power BI Service, you can check the dataset settings. Go to Power BI Service. Navigate to Datasets. Click Settings on the dataset linked to the semantic model. Look for Data source credentials → This may provide API details. If credentials reference an API key, it indicates the dataset is pulling from Application Insights.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Thank you for your response. I tried using the Performance Analyzer, but it appears empty.
I export data:
{"version":"1.1.0",
"events":[{
"name":"User Action",
"component":"Report Canvas",
"start":"2025-03-27T10:04:26.601Z",
"id":"73e465ac090019e4780c",
"metrics":{"sourceLabel":"UserAction_StartedMonitoring"}},
{"name":"User Action",
"component":"Report Canvas",
"start":"2025-03-27T10:04:28.432Z",
"id":"52c8a3b47dea01e86b50",
"metrics":{"sourceLabel":"UserAction_Refresh"}}],
"sessionId":"54cdf304-e3c5-481d-acf2-ca3457fe4349"}
I found out that Storage model is DirectQuery.
It means that you won’t find transformation queries in Power Query Editor.
Yes, report is published to the Power BI Service. credentials reference an API key and the dataset is pulling from Application Insights. I can fine right Application Insights by API key. But there is no relevant table or query
Do you have any advice on how to find the query?
- v-kpoloju-msft1 year ago
Community Support
Hi MarynaBan,
Apologies for the late reply. After reviewing the details you provided, I have identified few workarounds that may help resolve the issue. Please follow these steps:
There is no direct built-in feature in Power BI Service to capture API calls, but you can use the following workarounds to track API requests being sent from Power BI:
As your Power BI model operates in Direct Query mode, you can utilize DAX Studio to capture the executed queries. Using DAX Studio open the application and connect it to your Power BI model. Then, enable query tracing by navigating to the Advanced tab and selecting Enable All Queries under the Tracing section. After enabling this setting, refresh your Power BI report.
SQL Profiler can be utilized to monitor Direct Query activity in Power BI. To start, install SQL Profiler from SQL Server Management Studio. Then, connect to Power BI Desktop's local instance by opening DAX Studio, going to the Advanced tab, and copying the Localhost connection string. Open SQL Server Profiler and connect to this instance. Initiate a new trace and refresh the Power BI report to capture Direct Query requests, enabling effective monitoring of API calls.
SQL Server Profiler - SQL Server Profiler | Microsoft Learn
Since the report is published to Power BI Service, you can review the dataset logs to analyse API activity. Navigate to Power BI Service and select the relevant dataset. Then, go to Settings and check the Data source credentials section for any available API details. If the API details are not visible, you can try extracting logs by accessing the Workspace, clicking on Dataset Refresh History, and reviewing any failed refresh attempts. These failures may provide insights into API call details.
Capture API requests directly from Power BI using Fiddler or browser dev tools. Install Fiddler Classic, then open Fiddler and start capturing network traffic. Open Power BI Desktop and refresh the report. Look for requests to api.applicationinsights.io. Extract the exact API query used. Using Browser Dev Tools for Power BI Service: Open your Power BI Report in a browser. Press F12 to open Developer Tools. Go to the Network tab → Filter for applicationinsights.io. Refresh the report and look for the full API request.If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
- v-kpoloju-msft1 year ago
Community Support
Hi MarynaBan,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
- v-kpoloju-msft1 year ago
Community Support
Hi MarynaBan,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.