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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
chethan4046
Regular Visitor

Automate Power BI Deployment & Data Refresh via GitHub Integration

Hi Team,

I have Power BI workspaces connected to GitHub integration. Currently, when I merge changes to GitHub, Power BI shows a manual prompt in the UI to apply the updates. However, I need this process to be fully automated — no manual button clicks.

My requirements are:

  1. Auto-deployment — When changes are merged to a GitHub branch, they should automatically be applied to the corresponding Power BI workspace without any manual intervention in the UI.
  2. Automatic data source refresh — Once deployment is complete, the data source should automatically refresh so the entire flow is end-to-end automated.
  3. Multi-environment support — I maintain separate environments (Dev, QA, and Prod), each with their own Power BI workspace. The same automated deployment and refresh flow needs to apply to all three environments based on which branch is merged.

I am already using GitHub as my version control system, so all changes should reflect automatically in Power BI without requiring manual steps in the UI.

Could you please advise on the best approach to achieve this?

Thank you.

@cengizhanarslan @ danextian

 

 

Screenshot 2026-03-10 at 10.12.30 AM.png

1 ACCEPTED SOLUTION

That looks promising @chethan4046. Power BI supports Github and Azure DevOps better (kind of sad for Bitbucket) so yeah there is a good chance that it could be done cleanly. Give it a go! I might also give it a try over the weekend and thanks for sharing them!

View solution in original post

8 REPLIES 8
alish_b
Super User
Super User

Hi @chethan4046 ,

 

I was able to achieve this with Bitbucket pipelines and I think the process will be similar with Github Actions. And I am assuming you are already using PBIP format since you mentioned you have been doing version control for a while. The key components are Service Principal ( basically a robotic user that will authenticate to the workspaces and carry out the deployments), Fabric APIs. These two will automate the deployment part and to trigger the deployment process you will use Github Actions to trigger it on branch merges (say if you merge to main, it will automatically trigger the deployment to your designated workspace).
 I think the main APIs were Set-FabricAuthToken (to authenticate to the workspace), Invoke-FabricAPIRequest (to get workspaces and items list) and Import-FabricItem (does the actual deployment). I don't remember if I added the refresh part though as I already had quite frequent schedule refreshes (but I should revisit that part).

I hope you have fun doing it and I hope that this helps!

Hi @alish_b  Thanks. 
I am trying to use this method. What is your opnion on this 

Here are the relevant APIs and documentation links.

Git (Fabric API):
Documentation: https://learn.microsoft.com/en-us/rest/api/fabric/core/git

Example API:
POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/git/updateFromGit

This API can be used to update/sync the workspace from Git.

Dataset Refresh (Power BI API):
Documentation: https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/refresh-dataset

Example API:
https://api.powerbi.com/v1.0/myorg/groups/$WORKSPACE_ID/datasets/$DATASET_ID/refreshes

This API triggers a dataset refresh in the specified workspace.

That looks promising @chethan4046. Power BI supports Github and Azure DevOps better (kind of sad for Bitbucket) so yeah there is a good chance that it could be done cleanly. Give it a go! I might also give it a try over the weekend and thanks for sharing them!

Hi @chethan4046 ,

 

I would also take a moment to thank @alish_b   , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I hope the issue has been resolved. If you continue to experience any problems, please reach out here and we will assist you.

Best Regards, 
Community Support Team

Hi @chethan4046 ,

I hope the issue has been resolved. If you continue to experience any problems, please reach out here and we will assist you.

Best Regards, 
Community Support Team

P.S. Remember to grant rights to the service principal to the workspace and the connections used. I had to go down a rabbit hole because I had not done that.

chethan4046
Regular Visitor

@rohit1991 

Thank you for your reply.

Okay, I will try to use the Power BI REST APIs. Do you have any specific documentation that explains the permissions required for the service principal, the necessary configuration, and which APIs need to be called to achieve the above requirements? also is power bi have cli tool also to this kind of operations ?

Thanks in advance.

rohit1991
Super User
Super User

Hii @chethan4046 

 

Power BI Git integration currently supports version control only, but it does not automatically apply merged changes to the workspace. The “Apply updates” step in the UI is required by design. To automate deployment, you must use an external CI/CD process such as GitHub Actions or Azure DevOps pipelines combined with Power BI REST APIs. When a branch merge occurs, the pipeline can deploy the updated artifacts to the target workspace and then trigger a dataset refresh using the Refresh Dataset API. Branch-to-workspace mapping (Dev, QA, Prod) can be handled within the pipeline to support multiple environments.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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