azure-pipelines-tasks: [REGRESSION]: AzureFileCopy@6 no longer works with "Workload identity federation" service connection
New issue checklist
- I searched for existing GitHub issues
- I read pipeline troubleshooting guide
- I checked how to collect logs
Task name
AzureFileCopy
Breaking task version
6.238.1
Last working task version
6.237.5
Regression Description
Using a WIF Service connection from Azure DevOps to Azure Storage account in Azure.
When the task runs the copy command then earlier I would see:
Uploading files from source path: ‘D:\a\1\a\xxx.zip’ to storage account: ‘storage_xyz’ in container: ‘container_xyz’ with blob prefix: ‘’ & azcopy copy “D:\a\1\a\xxx.zip” “https://storage_xyz.blob.core.windows.net/container_xyz/” --log-level=INFO --recursive INFO: Scanning… INFO: Login with Powershell context succeeded INFO: Authenticating to destination using Azure AD
however from yesterday when the new task was live in our tenant then:
Uploading files from source path: ‘D:\a\1\a\xxx.zip’ to storage account: ‘storage_xyz’ in container: ‘container_xyz’ with blob prefix: ‘’ & “AzCopy\AzCopy.exe” copy “D:\a\1\a\xxx.zip” “https://storage_xyz.blob.core.windows.net/container_xyz/” --log-level=INFO --recursive INFO: Scanning… To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code xxxxxxx to authenticate.
Then the task just blocks and fails after 1-2 minutes
Work-a-round, I have now removed the AzureFileCopy task and replaced it with a AzureCLI@2 task using the same service connection and calling:
az storage blob upload --account-name $Env:StorageAccountName -c $Env:ContainerName -f $Env:File --overwrite true --auth-mode login --only-show-errors
which is working, so I believe it is not the service connection.
Environment type (Please select at least one enviroment where you face this issue)
- Self-Hosted
- Microsoft Hosted
- VMSS Pool
- Container
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
windows-2022
Relevant log output
Uploading files from source path: 'D:\a\1\a\xxx.zip' to storage account: 'storage_xyz' in container: 'container_xyz' with blob prefix: ''
& "AzCopy\AzCopy.exe" copy "D:\a\1\a\xxx.zip" "https://storage_xyz.blob.core.windows.net/container_xyz/" --log-level=INFO --recursive
INFO: Scanning...
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code xxxxxxx to authenticate.
Full task logs with system.debug enabled
UNSUCCESSFUL RUN
[REPLACE THIS WITH YOUR INFORMATION]
SUCCESSFUL RUN
[REPLACE THIS WITH YOUR INFORMATION]
Repro steps
trigger: none
pool:
vmImage: windows-2022
steps:
- task: ArchiveFiles@2
displayName: "Zip Doc"
inputs:
rootFolderOrFile: $(Agent.BuildDirectory)/s/doc
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/doc.zip'
replaceExistingArchive: true
- task: AzureFileCopy@6
displayName: "Upload Doc to Blob"
inputs:
SourcePath: '$(Build.ArtifactStagingDirectory)/doc.zip'
azureSubscription: 'Az Subscription'
Destination: 'AzureBlob'
storage: 'storage_xyz'
ContainerName: 'container_xyz'
BlobPrefix: 'test'
About this issue
- Original URL
- State: closed
- Created 3 months ago
- Reactions: 3
- Comments: 16 (1 by maintainers)
Having the same issue I thought it was something I had done. Glad to see I’m not going crazy.
Is there a update on this? We are experiencing the same
I can confirm as well that it’s working correctly now. Working version was 6.238.9, where version 6.238.1 was the last one I noticed failing.
experiencing the same issue as well. Reverted service connection and still the same issue with device login
Yes, it’s working fine now. Thank you 👍🏻
Yes it’s working, thank you!
New version of the task (ie 238.8 and 238.9) is out now, can anyone confirm if it’s working fine or not?
But the version has changed from
6.238.4
to6.238.6
however, this task is failing since6.238.1
which means the issue has been introduced in earlier versions. This is of course my understanding.