Hi Team,
We are facing an issue with azcopy when using in a container to copy data in a blob storage. For login we are using AZCOPY_AUTO_LOGIN_TYPE, AZCOPY_SPA_APPLICATION_ID, AZCOPY_SPA_CLIENT_SECRET and AZCOPY_TENANT_ID environment variable. When hard coding the variables like:
export AZCOPY_AUTO_LOGIN_TYPE=SPN
export AZCOPY_SPA_APPLICATION_ID=*******
export AZCOPY_SPA_CLIENT_SECRET=********
export AZCOPY_TENANT_ID=*********
azcopy copy test2.txt 'https://*****.blob.core.windows.net/******'
then the azcopy is working fine and when we are just making these variable available in the container with their values then it is giving below error message:
Error: "failed to perform copy command due to error: no cached token found, please log in with azcopy's login command, required key not available"
We have tried with keyctl session as well but no luck and below are the articles from where we tried to resolve this issue.
https://github.com/Azure/azure-storage-azcopy/issues/452
https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-authorize-azure-active-directory#authorize-a-service-principal-by-using-a-client-secret-1