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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jeffhoward001
New Member

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

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.