Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I get logs from Log Analytics, create graphs in Power BI and update regularly.
However, the refresh began to fail irregularly two weeks ago.
This phenomenon is happening in various reports I have. Is there anyone who knows the cause?
Message: | Web.Contents failed to get contents from 'https ://api.loganalytics.io/v1/workspaces/ .../query?query=OfficeActivity...' (502): Bad Gateway Table: LogAnalytics. |
M Query
let jp_timezone = (x as datetimezone) as datetimezone => DateTimeZone.SwitchZone(x, 9),
AnalyticsQuery =
let Source = Json.Document(Web.Contents("https://api.loganalytics.io/v1/workspaces/...../query",
[Query=[#"query"="OfficeActivity
| where ( OfficeWorkload == ""OneDrive"" or OfficeWorkload == ""SharePoint"")
",#"x-ms-app"="OmsAnalyticsPBI",#"prefer"="ai.response-thinning=true"],Timeout=#duration(0,0,10,0)])),
TypeMap = #table(
{ "AnalyticsTypes", "Type" },
{
{ "string", Text.Type },
{ "int", Int32.Type },
{ "long", Int64.Type },
{ "real", Double.Type },
{ "timespan", Duration.Type },
{ "datetime", DateTimeZone.Type },
{ "bool", Logical.Type },
{ "guid", Text.Type },
{ "dynamic", Text.Type }
}),
DataTable = Source[tables]{0},
Columns = Table.FromRecords(DataTable[columns]),
ColumnsWithType = Table.Join(Columns, {"type"}, TypeMap , {"AnalyticsTypes"}),
Rows = Table.FromRows(DataTable[rows], Columns[name]),
Table = Table.TransformColumnTypes(Rows, Table.ToList(ColumnsWithType, (c) => { c{0}, c{3}}))
in
Table,.......
@Anonymous ,
Please check if the Azure credentials is still valid or expired.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yuta-msft
Thanks for the reply.
I have verified my credentials but they have not expired.
If the Azure credentials have expired, then all of the report refreshes should have failed.
When the report refresh is successful, I can check the latest log.
I would like to apologize for my poor English.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!