Forum Discussion
Update from Git - Azure Devops Pipeline
- 1 year ago
Hi, MartinMason
Update your pipeline's PowerShell script to use the PAT instead of trying to authenticate via Service Principal.
- powershell: | $pat = "$(PAT)" # Your PAT stored securely in Azure DevOps $headers = @{ Authorization = "Bearer $pat" "Content-Type" = "application/json" } $body = @{ remoteCommitHash = "$(GIT_COMMIT_HASH)" conflictResolution = @{ conflictResolutionType = "Workspace" conflictResolutionPolicy = "PreferWorkspace" } options = @{ allowOverrideItems = $true } } Invoke-RestMethod -Uri "https://api.fabric.microsoft.com/v1/workspaces/$(PBI_WORKSPACE_ID)/git/updateFromGit" -Method Post -Headers $headers -Body ($body | ConvertTo-Json -Compress) displayName: 'Update Power BI Workspace from Git'For now, the PAT approach or interactive user authentication are your best bets to achieve the desired functionality. Both have their pros and cons, but they can enable automated deployments until Microsoft officially supports Service Principal authentication for this endpoint.
Hi everyone,
I followed the script shared in this thread to update a Power BI workspace from Git using Azure DevOps as the source control. However, I encountered the following error:
Invoke-RestMethod: The operation is not supported for the principal type
"PrincipalTypeNotSupported"
"resourceType": "AzureDevOpsSourceControl"
After further investigation, I realized that Microsoft Fabric currently supports Git-based deployments only when using GitHub as the single source of truth. Azure DevOps as a source control type is not supported at this moment.
Could someone from the Microsoft Fabric team or the community confirm whether there are plans to support Azure DevOps as a source control in the future? It would be extremely helpful to know if this feature is on the roadmap.
Any insights or updates would be greatly appreciated!
Thank you in advance!