Forum Discussion
Azure devops pipeline to push code to fabric
Hello team, I am trying to build an Azure devops yaml pipeline to push code to a fabric workspace. I already have a service principal but it is not working as updatefromgit fabric api only support git provider from github. Now I am stuck. what could be done here.
It only support user token and not app token.
As it is a devops pipline so everything should be automated.
Could someone guide me on what could be achieved here?
- Anonymous1 year ago
Hi Debitsme,
Thank you for reaching out to Microsoft Fabric Community Forum.
Microsoft Fabric’s updateFromGit API only supports GitHub and requires a user PAT, so it doesn’t work with Azure DevOps or service principals — limiting full CI/CD automation from DevOps.
Instead of using the Fabric updateFromGit API, we can deploy our Power BI content — saved as .pbip (Power BI Project) or .pbix files — directly to the Fabric workspace using the Power BI REST API.
This works well with Azure DevOps, is secure, and it's 100% automated.
For reference: https://learn.microsoft.com/en-us/fabric/cicd/deployment-pipelines/pipeline-automation
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Regards,
Vinay Pabbu Hi Debitsme,
You can use the Fabric CI/CD package to streamline your deployment process. The fabric-cicd Python library is designed for deploying Microsoft Fabric items from a repository into a workspace. It supports various authentication methods, including user tokens, SPN, Managed Identity, etc. , and can help automate your CI/CD workflows.
Key Features of the Fabric CI/CD Module:
- Easy Configuration: Provide the target workspace ID, the local directory to deploy from, and the desired item types.
- Parameterization: Change environment-specific values at the time of deployment.
- Authentication: Supports all Azure TokenCredential methods (User, SPN, Managed Identity, etc.).
- Debuggability: Enable debugging to see all outbound API calls.
- Item Types: Supports Notebooks, Environments, Data Pipelines, Semantic Models, and Reports, with more to come based on community priorities.
You can build an Azure DevOps pipeline to integrate this package, ensuring a seamless and automated deployment process.
you can check the following documentation:
Introducing fabric-cicd Deployment Tool | Microsoft Fabric Blog | Microsoft Fabric
GitHub - microsoft/fabric-cicd: Jumpstart CICD deployments in Microsoft Fabric
Getting Started - fabric-cicd
Best Regards,
Shreya
8 Replies
- AnonymousNot applicable
Hi Debitsme,
Thank you for reaching out to Microsoft Fabric Community Forum.
Microsoft Fabric’s updateFromGit API only supports GitHub and requires a user PAT, so it doesn’t work with Azure DevOps or service principals — limiting full CI/CD automation from DevOps.
Instead of using the Fabric updateFromGit API, we can deploy our Power BI content — saved as .pbip (Power BI Project) or .pbix files — directly to the Fabric workspace using the Power BI REST API.
This works well with Azure DevOps, is secure, and it's 100% automated.
For reference: https://learn.microsoft.com/en-us/fabric/cicd/deployment-pipelines/pipeline-automation
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Regards,
Vinay Pabbu - Shreya_BarhateResolver II
Hi Debitsme,
You can use the Fabric CI/CD package to streamline your deployment process. The fabric-cicd Python library is designed for deploying Microsoft Fabric items from a repository into a workspace. It supports various authentication methods, including user tokens, SPN, Managed Identity, etc. , and can help automate your CI/CD workflows.
Key Features of the Fabric CI/CD Module:
- Easy Configuration: Provide the target workspace ID, the local directory to deploy from, and the desired item types.
- Parameterization: Change environment-specific values at the time of deployment.
- Authentication: Supports all Azure TokenCredential methods (User, SPN, Managed Identity, etc.).
- Debuggability: Enable debugging to see all outbound API calls.
- Item Types: Supports Notebooks, Environments, Data Pipelines, Semantic Models, and Reports, with more to come based on community priorities.
You can build an Azure DevOps pipeline to integrate this package, ensuring a seamless and automated deployment process.
you can check the following documentation:
Introducing fabric-cicd Deployment Tool | Microsoft Fabric Blog | Microsoft Fabric
GitHub - microsoft/fabric-cicd: Jumpstart CICD deployments in Microsoft Fabric
Getting Started - fabric-cicd
Best Regards,
Shreya- KevinChantSuper User
Hi all,
I can elaborate on this by sharing a link that covers exactly how to use fabric-cicd with a YAML pipeline in Azure DevOps. It even contains a link to a sample template you can use.
I hope this helps...
- yaronprigalMicrosoft Employee
Hi Debitsme, our team is working on releasing the SPN support for Azure DevOps in the upcoming weeks.
Stay tune.
Thanks
- burakkaragozSuper User
Hi Debitsme ,
You want to create a YAML pipeline to push code from Azure DevOps to a Microsoft Fabric workspace, but you're stuck because the updateFromGit API only supports GitHub and only works with a user token. This is currently a common situation due to the limitations of Fabric APIs.
🔍 Summary of Issue:
- updateFromGit API currently only supports repos from GitHub.
- Also, it works with the user token, not the service principal (app token).
- In Azure DevOps pipelines, app-based authentication is usually preferred (because it requires automation).
✅ Possible Solutions:
1. Using User Token with Middleware Script (Workaround)
- You can define the user token (PAT) as a secret in the Azure DevOps pipeline and call the updateFromGitAPI with a PowerShell or Bash script.
- This method is not fully automated because manual renewal is required when the token expires.
2. Migrate to GitHub Actions (Recommended Method)
- If possible, you can migrate your code to GitHub and integrate directly with the Fabric API using GitHub Actions.
- Since GitHub is Fabric's native platform, this method is more stable and supported.
3. Expected Feature: App Token Support
- In Microsoft's roadmap, Fabric API access with service principal is planned.
- When this feature arrives, Azure DevOps pipelines will be directly supported.
4. Alternatif: Notebook or Pipeline Deployment APIs
- If your goal is just to deploy notebooks or pipelines, you can use Fabric REST APIs like PUT /notebooks or PUT /pipelinesto perform these operations in a YAML pipeline.
- These APIs can work with app tokens in some cases (less restricted).
Summary:
Currently limited Azure DevOps + Fabric API integration for full automation. The best workaround:Define user token as secret,
Calling updateFromGitwith a script.
However, in the long run, it would be more sustainable to switch to GitHub Actions or wait for Microsoft's app token support. - AnonymousNot applicable
Hi Debitsme,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.Regards,
Vinay Pabbu- AnonymousNot applicable
Hi @Debitsme,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.Regards,
Vinay Pabbu- AnonymousNot applicable
Hi @Debitsme,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.Regards,
Vinay Pabbu