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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.