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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.