The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello
I’m trying to automate the creation of Power BI deployment pipeline with stages using azure yaml pipeline. My yaml code got the inspiration from the below example PowerShell script that was provided my Microsoft https://github.com/microsoft/PowerBI-Developer-Samples/blob/master/PowerShell%20Scripts/DeploymentPi...
I’m just wondering if the below two options are possible
I’m using the Power BI Rest API and Invoke-PowerBIRestMethod command to create deployment pipeline where it would have more than three stages Dev, Test and Pre-Production and Production. After reading through lot of documentation, it seems to me that Power BI Rest API and Invoke-PowerBIRestMethod would only allow me to create three fixed default stages and I wont be able to add Pre-Production stage between Test and production. Is my statement correct?
The alternative approach is to create the deployment pipeline manually within the GUI itself where there is no stage restriction. Let’s say I create four stages in GUI, then I create a yaml automation pipeline that uses Power BI Rest API and Invoke-PowerBIRestMethod command. Would the Power BI Rest API and Invoke-PowerBIRestMethod command recognize and identify the existing deployment pipeline that was created manually especially the Pre-Production stage?
Solved! Go to Solution.
Sample Scripts
Microsoft provides sample PowerShell scripts for various deployment scenarios:
These scripts demonstrate how to authenticate, create pipelines, assign workspaces, and perform deployments using the Power BI REST API with PowerShell.
Feel free to explore these resources to tailor your deployment automation to your specific needs!
Hi @wasimCG ,
Thank you for contacting the Microsoft Fabric Community.
Special thanks to @Ilgar_Zarbali , for the clarification and for sharing the sample scripts.
Please feel free to explore the resources provided to tailor them to your scenario as suggested.
Stay connected with the community for any future questions or discussions we're here to help.
Regards,
Yugandhar.
Hi @wasimCG ,
Thank you for contacting the Microsoft Fabric Community.
Special thanks to @Ilgar_Zarbali , for the clarification and for sharing the sample scripts.
Please feel free to explore the resources provided to tailor them to your scenario as suggested.
Stay connected with the community for any future questions or discussions we're here to help.
Regards,
Yugandhar.
Yes, you're right — the Power BI REST API only allows 3 default stages (Dev, Test, Prod). You can't add a custom stage like Pre-Production through the API. But if you create the 4-stage pipeline manually in the GUI, the API can still recognize and interact with it.
Thanks for your reply. Could you please let me know which command can interact with existing pipelines or could you please point me to any existing example PowerShell scripts that does this?
Sample Scripts
Microsoft provides sample PowerShell scripts for various deployment scenarios:
These scripts demonstrate how to authenticate, create pipelines, assign workspaces, and perform deployments using the Power BI REST API with PowerShell.
Feel free to explore these resources to tailor your deployment automation to your specific needs!