Forum Discussion
Azure DevOps + Deployment Pipeline Integration Error
I am trying to set up ADO integration with a new Deployment Pipeline using the BI Automation Tools ADO addon. I created an ADO pipeline in the classic editor with the following task (workspace/pipeline details blacked out):
When I run this pipeline, I receive a 404 error with the response:
- Changed the Production stage's name from "Prod" back to "Production" - same error
- Granted the Pipeline.ReadWrite.All permission to the SPN - same error
This is the only thing holding us up from having a slick solution set up for source control, so any help with resolving this is appreciated!
I would advise looking to try this in a YAML pipeline instead, using the PowerShell script provided by Microsoft instead of the task.
I have a post that covers how to do that below:
https://www.kevinrchant.com/2024/06/11/update-fabric-deployment-pipeline-stages-with-deploymentpipelines-deployall-and-yaml-pipelines/I hope this helps, if so give it some kudos and/or mark it as the solution.
13 Replies
- KevinChantSuper User
I would advise looking to try this in a YAML pipeline instead, using the PowerShell script provided by Microsoft instead of the task.
I have a post that covers how to do that below:
https://www.kevinrchant.com/2024/06/11/update-fabric-deployment-pipeline-stages-with-deploymentpipelines-deployall-and-yaml-pipelines/I hope this helps, if so give it some kudos and/or mark it as the solution.
- LeifBAdvocate II
Thanks Kevin, I have been trying to implement this over the past week, just the part that deploys Test to Production. I seem to be stuck though; the second PowerShell script succeeds but outputs the following error: Failed to deploy. Error reponse: {"requestId":"[ID]","errorCode":"InvalidToken","message":"Access token is invalid"}
I set up the authentication with the key vault connection in the variable group as you recommended, and passed the name of the secret into the first PS script, which succeeds. But then it seems like the connection isn't retained when the second script runs. Any suggestions?
- KevinChantSuper User
How are you authenticating?
One error I see is when authenticating with PowerShell, because sometime s when using PowerShell in ADO you require quotes.
Try replicating what you are trying to do locally first in PowerShell, if that works test with and without quotes around your secret value.
- v-dineshyaCommunity Support
Hi LeifB ,
Thank you for reaching out to the Microsoft Community Forum.
The error indicates that the Power BI Deployment Pipeline stage name provided in your ADO task does not match what Power BI expects.
Please try below things to fix the issue.
1. Go to Power BI Service --> Deployment Pipelines --> Your Pipeline. Check the stage names are same for Development, Test, and Production all are case-sensitive.
2. Go to Power BI, open the pipeline and copy its ID from the URL. And check the ADO task references the correct pipeline.
3. Go to Power BI Admin Portal --> Deployment Pipelines, confirm the SPN is an Admin. Also check workspace permissions for each stage.
4. Please use the latest version of BI Automation Tools for ADO.
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
- LeifBAdvocate II
Hi Dinesh, thanks for the reply. I followed your steps and unfortunately still got the same error. Can you confirm that this is the setting the SPN should be on? If so, I did confirm that it is.
To clarify, we only have Test and Production workspaces/stages. Is it required to have Development as well in order to use the BI Automation Tools?
Edit: I tried deleting and recreating the Deployment Pipeline to have all 3 stages and ran it again, but now it's saying that it can't find the pipeline. I did confirm that I added the SPN as an admin on the pipeline and all workspaces.
- v-dineshyaCommunity Support
Hi LeifB ,
The SPN is correctly added as an Admin on the pipeline. So permissions are not the issue.
Is it required to have Development as well in order to use the BI Automation Tools?Yes, the Power BI Deployment Pipeline API expects all three stages to exist. Even if you only plan to use Test and Production, the pipeline object must include all three stages because the API schema is fixed. If Development is missing, the API call will fail with "PipelineStageNotFound" error.
The error “pipeline not found” refers to when you recreated the pipeline, the pipeline ID changed. Your ADO task might still be referencing the old pipeline name or ID. The BI Automation Tools task uses the pipeline name internally, but if the service connection cached the old ID, it can cause this error.
Please check below things to fix the issue.1. Go to the new pipeline in Power BI. Copy the ID from the below URL.'
https://app.powerbi.com/groups/me/deploymentpipelines/{pipelineId}
Use this ID in your ADO task if the add-on supports direct ID entry.
2. Go to the task settings, re-select the pipeline from the dropdown. Save and queue the pipeline again.
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh