Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure File Copy fails due to 'Unsupported authentication scheme 'WorkloadIdentityFederation'

Note: I created a azure devops service connection with WorkloadIdentityFederation.

Error as follows:

##[error]Upload to container: 'sample' in storage account: 'sampleBlob' with blob prefix: 'sample.yaml' failed with error: 'Unsupported authentication scheme 'WorkloadIdentityFederation' for endpoint.' For more info please refer to https://aka.ms/azurefilecopyreadme

like image 213
Techie Avatar asked Oct 16 '25 10:10

Techie


2 Answers

This was true, however as of file copy v6 we can use workload identity federation https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/azure-file-copy-v6?view=azure-pipelines

like image 143
Oskar Gewalli Avatar answered Oct 19 '25 01:10

Oskar Gewalli


Refer this Github issue1 Github issue2 on the same error looks like WorkloadIdentity is not yet supported, You can use Azure Resource manager connection with service principal authentication or normal service connection and asisgn service connection appropritate roles like Azure Storage Blob Data contributor or Azure Storage Blob Data owner role on the Storage account. You can directly make use of SAS token with limited roles in your azcopy url too.

My Azure Devops service connection:-

enter image description here

Assigned Storage Blob Data Owner role to the powershell service principal:-*

enter image description here

My Azure Devops AzFileCopy task:-

trigger:
- main

pool:
  vmImage: windows-latest

steps:
- task: AzureFileCopy@4
  inputs:
    SourcePath: '$(build.sourcesdirectory)'
    azureSubscription: 'PowershellSid'
    Destination: 'AzureBlob'
    storage: 'valleystrg51'
    ContainerName: 'datadest'
    additionalArgumentsForBlobCopy: --recursive=true

Output:-

enter image description here

like image 27
SiddheshDesai Avatar answered Oct 18 '25 23:10

SiddheshDesai



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!