Reading Time: 3 minutesIn this post I cover the mystery of the fabric-cicd authentication that never was. To help others who experience similar issues with fabric-cicd. Allow me…
The post Mystery of the fabric-cicd authentication that never was appeared first on K Chant.
Reading Time: 3 minutes
In this post I cover the mystery of the fabric-cicd authentication that never was. To help others who experience similar issues with fabric-cicd.
Allow me to explain. A while back I encountered issues whilst testing some things for the Azure DevOps version of the FUAM deploymenator.
Which is a FUAM deployment accelerator that I developed in order to push FUAM deployments from Azure DevOps to a Microsoft Fabric tenant. Like in the overview diagram below.
Overview of FUAM deploymenator process
I had copied the same logic over from the GitHub version of the FUAM deploymenator to authenticate as a service principal and deploy with fabric-cicd.
Deploying with fabric-cicd in the same tenant worked fine. However, when I attempted to populate the workspace with fabric-cicd in another tenant I was getting the below error.
Unhandled error occurred calling GET on 'https://api.powerbi.com/v1/workspaces/{MyWorkspaceId}/folders'.
I was experiencing this issue on a couple of separate tenants. So, the first thing I did was check that the Tenant admin settings were the same in another tenant.
Once I had matched the tenant settings, I tested deploying with Azure DevOps again and it failed. I then tested deploying in an Azure DevOps organization in the same region as the other tenant. Which also failed.
I then tested the GitHub version of the FUAM deploymentator on the same tenant. Which worked fine. I then ran the PowerShell involved locally as well, which also worked fine.
However, I was still experiencing issues when attempting to deploy in Azure DevOps. So I enabled verbose logs in Azure DevOps and debugging in fabric-cicd. In order to investigate further.
After further investigation I discovered I was getting 404 issues. Which typically relates to authentication issues.
However, my authentication appeared to be fine according to Azure DevOps. The task appeared to be completed, and it showed the tenant name as below.
Authenticate as Service Principal for fabric-cicd task in Azure DevOpsBut it was still looking like an authentication issue. So, I tested adding quotes around the parameter for the service principal secret in the PowerShell task that performs authentication as below.
- task: PowerShell@2
displayName: 'Authenticate as Service Principal for fabric-cicd'
inputs:
targetType: 'inline'
script: |
Install-Module -Name Az.Accounts -AllowClobber -Force
$SecureStringPwd = ConvertTo-SecureString '${{parameters.azure_client_secret}}' -AsPlainText -Force
$pscredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList ${{parameters.azure_client_id}}, $SecureStringPwd
Connect-AzAccount -ServicePrincipal -Credential $pscredential -Tenant ${{parameters.azure_tenant_id}}
$fabricToken = (Get-AzAccessToken -ResourceUrl $(resourceUrl)).Token
pwsh: true
All of a sudden, my fabric-cicd deployments started working. Which means that the completed authentication task had been misleading all along.
So, if you encounter a similar issue whilst working with PowerShell tasks in Azure DevOps I recommend testing with quotes.
I hope that by the mystery of the fabric-cicd authentication that never was I help others who experience a similar issue. Because Azure DevOps showing the authentication task as completed was misleading.
In addition, it advocates working with service connections instead when looking to deploy with fabric-cicd. As shown in the post by Richard Mintz.
Of course, if you have any comments or queries about this post feel free to reach out to me.
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | Operationalize Fabric workspaces using Fabric CLI and fabric-cicd with GitHub Actions | 0 | 5 | 10-07-2025 |
| 2 | Managing Fabric connections with Fabric CLI when performing CI/CD | 0 | 5 | 08-08-2025 |
| 3 | Deploy a working Direct Lake semantic model with fabric-cicd and Fabric CLI | 0 | 5 | 18-08-2025 |
| 4 | Operationalize Fabric workspaces with Azure DevOps using Fabric CLI and fabric-cicd | 0 | 5 | 18-06-2025 |
| 5 | Tips for implementing FUAM in Microsoft Fabric | 0 | 5 | 07-07-2025 |
| 6 | Initial tests on the Microsoft Learn Docs MCP Server | 0 | 5 | 02-07-2025 |
| 7 | Introducing the FUAM deploymenator | 0 | 5 | 24-07-2025 |
| 8 | Azure DevOps version of the FUAM deploymenator | 0 | 5 | 04-08-2025 |
| 9 | Re: Integrity RX2800 i6 MCA Reboot after Panic | 0 | 5 | 25-06-2026 |
| 10 | XMPP-клиент на Tcl/Tk, который заводится даже на Android | 5 | 7 | 25-06-2026 |