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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Power BI REST API

Hi,

 

I am trying to automate the publishing of a pbix file held locally on my desktop to the online PBI service, through a C# script. Within the organisation, other people are then accessing the report direct from the online PBI service.

 

Looking into it, I see this can be achieved via the power bi api. However, when looking at the Power BI rest api documents it is saying that I need to register an application in order to get the client id. Is this the case even if I just want to automate the refresh & publish to the service?

 

Thank you in advance for your help!

1 ACCEPTED SOLUTION
Jayendran
Solution Sage
Solution Sage

Hi @Anonymous ,

 

Yes you are correct in order to call the PowerBI REST API you need the proper Autentication (OAuth=>Bearer token ) using the client id is the way to call any REST API including refresh & Publish to the service.

 

Refer this Code sample which will helps you to achieve your Automation through C#.

See my article PowerBI - CICD using Azure DevOps

 

View solution in original post

1 REPLY 1
Jayendran
Solution Sage
Solution Sage

Hi @Anonymous ,

 

Yes you are correct in order to call the PowerBI REST API you need the proper Autentication (OAuth=>Bearer token ) using the client id is the way to call any REST API including refresh & Publish to the service.

 

Refer this Code sample which will helps you to achieve your Automation through C#.

See my article PowerBI - CICD using Azure DevOps

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.