Forum Discussion
Help with Odata Api call Refresh status returning Dynamic Datasources, which cannot be refreshed
- 10 months ago
Hi UNICODE,
The main issue usually happens when Power BI Report Server doesn’t allow dynamic URLs during refresh. Instead of building URLs on the fly, the best approach is to connect once to the top-level OData endpoint and then navigate through the tables to get what you need. For example, you can go into the PowerBIReports table, expand the CacheRefreshPlans, and then expand the History column to view recent refresh details.
If you do need to use Web.Contents, make sure to use the RelativePath option and wrap it with Json.Document() so that the data returns as a proper table. Also, make sure to check for any permission issues conflicts between AD groups and Row-Level Security can also cause unexpected refresh problems.
Thanks,
Prashanth
Thanks for the link.
My main issue ended up being conficts between Ad groups and Row Level security.
I did try to reformat the link with RelativePath and web contents. Instead of getting back a table of values it was returning a file at that point. I saw other examples that placed a Json document command around the web contents, but I was having issues getting it formatted correctly.
For those playing along at home here is my code that drilled down to the History column of the CacheRefreshPlan on the Power Bi report:
let
Source = OData.Feed("Servername/reports/api/v2.0/PowerBiReports?$selectId,Path,CreatedBy,CacheRefreshPlans", null, [Implementation = "2.0"]),
#'Expanded CacheRefreshPlans" = Table.ExpandTableColumn(Source, "CacheRefreshPlans", {"Id","LastRunTime","LastStatus","History"},{"CacheRefreshPlans.Id","CacheRefreshPlans.LastRunTime","CacheRefreshPlans.LastStatus","CacheRefreshPlans.History"}),Then you can expand the History column to see the status of the last few refreshes.