skip to Main Content

I am facing issue in copying files from Edgenode to ADLS. For this i used AZCOPY and here is the code for that. It ran perfectly fine in Dev environment.

When it comes to the test environment it behaves odd,

    export AZCOPY_AUTO_LOGIN_TYPE="SPN"
    export AZCOPY_SPA_APPLICATION_ID="$client_id"
    export AZCOPY_SPA_CLIENT_SECRET="$client_secret"
    export AZCOPY_TENANT_ID="$tenant_id"
    az login --service-principal -u $client_id --tenant $tenant_id -p $client_secret

Azcopy code
azcopy cp –overwrite "True" "$src_file_path" "$dest_file_path" –put-md5

and the error snipped which I am getting in test environment is
enter image description here

Any suggestions or solutions please?

2

Answers


  1. The 403 unauthorized error usually occurs if you don’t have required permissions/roles to perform the action.

    To resolve the error, try assigning Storage Blob Data Owner or Storage Blob Data Contributor role to your storage account.

    enter image description here

    Confirm whether the roles are assigned or not by following below:

    Go to Azure Portal -> Azure Active directory -> Users -> Select user -> Azure role assignment

    enter image description here

    Reference:

    What is the best way to transfer huge files to Azure Data Lake Storage? (nealanalytics.com)

    azure cli – az login with certificate protected with password – Stack Overflow

    Login or Signup to reply.
  2. If you have the IAM control set correctly and if the storage account is restricted to connect from specific networks only then you need to add your IP address to the access list.

    Go to Azure Portal -> Storage Account -> Networking -> Click on Add you IP address -> Hit Save
    This should help you fix the error.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search