Hello Prabhu,
The root cause of your issue is that the Azure Synapse deployment task does not currently support Workload Identity Federation authentication. Even though your service connection is configured with WIF correctly and the Service Principal has valid federated credentials, the underlying deployment task attempts to retrieve an access token using the legacy ServicePrincipal credential flow, which fails in WIF-based contexts with the error
Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired.
To resolve this issue, you should switch from the Synapse GUI task to an AzureCLI@2 task, which fully supports WIF and can deploy Synapse artifacts using Azure PowerShell or REST APIs. In order to replace Synapse task with AzureCLI@2, create a new Azure CLI task in your release pipeline
- task: AzureCLI@2
inputs:
azureSubscription: 'synapse-serviceconnection' # your WIF-based service connection
scriptType: 'ps'
scriptLocation: 'inlineScript'
inlineScript: |
# Authenticate and deploy Synapse ARM Template
$resourceGroup = 'rg-dibber-global-analytics-prod'
$workspaceName = 'synapse-global-analytics-prod'
$templatePath = "$(System.DefaultWorkingDirectory)/_YourArtifact/drop/template.json"
$parametersPath = "$(System.DefaultWorkingDirectory)/_YourArtifact/drop/parameters.json"
az deployment group create `
--resource-group $resourceGroup `
--template-file $templatePath `
--parameters @$parametersPath `
--name synapseDeployment-$(Build.BuildId)
Just ensure your synapse-serviceconnection is set up with WIF and the Federated Credential in Entra ID has issuer: https://vstoken.azure.net
If you must use the Synapse Deployment Task UI in the future, please note that Microsoft currently does not support WIF for that task. Until an updated task version is released with WIF support, using the AzureCLI@2
task is the most reliable and secure workaround.
you can checkout below MS docs-
Set up Workload Identity Federation for Azure DevOps