I managed to query my AI telemetry data from Azure Data Explorer specifying the cluster as: https://ade.applicationinsights.io/subscriptions/MYSUBSCRIPTION-GUID/resourcegroups/MY-RG/providers/microsoft.insights/components/MY-AINAME
When I use the Export to Power BI, I get the following script:
let
Source = AzureDataExplorer.Contents("https://ade.applicationinsights.io/subscriptions/MYSUBSCRIPTION-GUID/resourcegroups/MY-RG/providers/microsoft.insights/components/MY-AINAME", "uptakesim", "customEvents#(lf)| where timestamp > ago(1d)", [Timeout = #duration(0,0,4,0)])
in
Source
When I try to run that exported query in Power BI I get the following error:
For some reason the sign in fails and does not show any prompt to login.
If I end the url at /microsoft.insights
(
https://ade.applicationinsights.io/subscriptions/MY_SUBSCRIPTION/resourcegroups/MY-RG/providers/microsoft.insights
), removing /components/MY-AINAME
the login works.
Instead, you can follow the below approach to read data from application insights data in power BI.
Open the application insights log in azure portal.
Type the query and run it.
Then click on Export and select Power BI (as an M Query)
This will give the query in a .txt
file.
Then in Power BI desktop, Click get data-> Blank Query
Click the Advanced editor. Replace the sample code with the power query from the exported file.
Click Done in the advanced editor window.
Data will be loaded in the power BI Power Query editor.
Reference: Log Analytics integration with Power BI and Excel - Azure Monitor | Microsoft Learn