Problem with DVC and Azure + tenant_id, client_id and client_secret

I am on the DVC version: 2.31.0 (pip)
My command are :
pip install ‘dvc[azure]’
dvc init --no-scm
dvc remote add -d myremote azure://xxxxxxx.core.windows.net/yyyyy/zzzz-dvc-dataset/
dvc remote modify --local myremote tenant_id “12345678-1234-1234-1234-123456789012”
dvc remote modify --local myremote client_id “abcdefgh-1234-1234-1234-123456789012”
dvc remote modify --local myremote client_secret “AAAAA~AAAAAAAAAAAAAAAAAAAAA_AAAAAAAAAAAA”

dvc add an_image.jpg
dvc push

All the tenant_id, client_id and client_secret are the same than used with azcopy :
I use azcopy with this variables without probleme :
export AZCOPY_SPA_APPLICATION_ID=“abcdefgh-1234-1234-1234-123456789012”
export AZCOPY_SPA_CLIENT_SECRET=“AAAAA~AAAAAAAAAAAAAAAAAAAAA_AAAAAAAAAAAA”
export AZCOPY_TENANT_ID=“12345678-1234-1234-1234-123456789012”
azcopy login --service-principal --application-id $AZCOPY_SPA_APPLICATION_ID --tenant-id $AZCOPY_TENANT_ID
azcopy copy ‘./01_RAW_From_Data_Lake/*’ ‘https://xxxxxxx.core.windows.net/yyyyy/zzzz-dvc-dataset/’ --recursive

Why the dvc push return this error message :
ERROR: configuration error - Authentication to Azure Blob Storage requires either account_name or connection_string.
ERROR: Authentication to Azure Blob Storage requires either account_name or connection_string.
Learn more about configuration settings at https://man.dvc.org/remote/modify.
/
The tenant_id, client_id and client_secret are enough for login with azcopy. where is the mistake with DVC?

Finally I founded the solution (the account_name is the name at the beginning of the url azure://xxxxxxx.core.windows.net):
dvc init --no-scm
dvc remote add -d myremote azure://xxxxxxx.core.windows.net/yyyyy/zzzz-dvc-dataset/
dvc remote modify --local myremote account_name “xxxxxxx”
dvc remote modify --local myremote tenant_id “12345678-1234-1234-1234-123456789012”
dvc remote modify --local myremote client_id “abcdefgh-1234-1234-1234-123456789012”
dvc remote modify --local myremote client_secret “AAAAA~AAAAAAAAAAAAAAAAAAAAA_AAAAAAAAAAAA”

dvc add an_image.jpg
dvc push

is equivalent to :
export AZCOPY_SPA_APPLICATION_ID=“abcdefgh-1234-1234-1234-123456789012”
export AZCOPY_SPA_CLIENT_SECRET=“AAAAA~AAAAAAAAAAAAAAAAAAAAA_AAAAAAAAAAAA”
export AZCOPY_TENANT_ID=“12345678-1234-1234-1234-123456789012”
azcopy login --service-principal --application-id $AZCOPY_SPA_APPLICATION_ID --tenant-id $AZCOPY_TENANT_ID
azcopy copy ‘./01_RAW_From_Data_Lake/*’ ‘https://xxxxxxx.core.windows.net/yyyyy/zzzz-dvc-dataset/’ --recursive

2 Likes