SqlAzureDacpacDeployment task login failing
(This question is probably not tagged correctly - I can't find a tag for Azure Pipelines).
I'm trying to use the SqlAzureDacpacDeployment@1 task to execute a SQL script file against an Azure SQL database, like this:
- task: SqlAzureDacpacDeployment@1
inputs:
azureSubscription: $(ServiceConnectionName)
authenticationType: connectionString
connectionString: $(ConnectionString)
deployType: sqlTask
sqlFile: PathToSqlFile.sql
The $(ConnectionString) variable is created via a prior AzureKeyVault task and contains a SQL username and password. When the task executes, it fails with a message like "login failed for <user>". The reported value of <user> is correct, matching the one specified in the connection string. When I use the same task earlier in the pipeline to deploy a database DACPAC, with the same connection string, this succeeds.
The error appears to be being thrown from an underlying PowerShell Invoke-SqlCmd call - is there a problem with the task, or am I using it incorrectly?
Many thanks