toto'
toto'

Reputation: 1574

Azure azcopy fails after AAD success authentication

I am trying to use azcopy tool from Ubuntu 20.04 to upload file to Azure Blob.

I am authenticated with AAD and SP:

export AZCOPY_SPA_CLIENT_SECRET="12345678"
azcopy login --service-principal  --application-id abc --tenant-id=xyz

Here I get auth success:

INFO: SPN Auth via secret succeeded.

However when I run:

azcopy copy './myfile' 'https://mystorageacc.blob.core.windows.net/mycontainer/myfile'

I get this error:

failed to perform copy command due to error: Login Credentials missing. No SAS token or OAuth token is present and the resource is not public

Obviously the AAD service principals are in the role 'Storage Blob Data Contributor' of the storage account.

What is wrong? thanks

Upvotes: 0

Views: 5075

Answers (1)

NeoTheNerd
NeoTheNerd

Reputation: 656

The answer to issue 'No SAS token or OAuth token is present' is to run the keyctl session workaround Session. This issue was identified and the keyctl work around can be found here - Azcopy login/logout fails https://github.com/Azure/azure-storage-azcopy/issues/452

Upvotes: 1

Related Questions