Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Creating a Report from PowerBI API

Hello -

 

I thought this would be a common request, but can't seem to find much in the forums 🙂  We're trying to create an Operational Health Dashboard (in PowerBI) for our PBI reporting environment.  End goal is to show all our workspaces, reports, datasets, and datasource connections, and a summary of any failures in down-stream dataset/datasource failures thus showing a cascading impact to reports.

 

After researching the topic, it appears the only way to do this is by hitting the PBI API (example below).  But api.powerbi.com doesn't appear to support integrated authentication when we specify the API as a "web" datasource.  What are we missing?  Seems weird that Microsoft doesn't support their own OAuth implementation.

 

So do we need to manually include the bearer token in the header of the the "web" datasource connection?  If so, any guidence on how to do this?  I'm really surprised this isn't a more common request, so I'm wondering of we're going down an atypical route.

 

https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes?$top=1

 

Thanks,

2 REPLIES 2
GilbertQ
Super User
Super User

Hi there

This certainly can be done when I have used the API with PowerShell

You have to always first authenticate which will then store the authenticated token as part of the call to Power BI.

Here is a blog post explaining how to get this done

https://powerbi.microsoft.com/en-us/blog/working-with-powershell-in-power-bi/




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

Thanks, and that is the route we're already going down.

 

My question to you is: Is there a way to fully automated that process?  Meaning, is there a way to do all this through a scheduled data refresh that authenticates the powershell commands, download the json, and loads the json data into a dataset fully automated without any user interation?

 

That is the end-goal of this project for us.

 

Thanks!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.