Azcopy failing in powershell script

Jigar Patel 41 Reputation points
2020-09-03T08:31:16.92+00:00

I have azure respo as artifact in release pipeline.

through powershell script I am trying to copy a folder to datalake storage gen 2 container.

I am authenticating via Oauth. the authenticating is getting successful.

However ta the end the job status is coming as Failed and the folder is not copied to the destination in ADLS2 container.

I am using the below script

azcopy login --identity $(System.AccessToken);
azcopy copy $(source) $(destination) --overwrite=prompt --from-to=LocalBlob --blob-type BlockBlob --follow-symlinks --put-md5 --follow-symlinks --recursive


if I simple use azcopy login then after logging in by entering the secret code the script continues and it successfully copies the folder to ADLS2 containeer.

Below is the log output

2020-09-03T08:09:32.6939497Z INFO: Login with identity succeeded.
2020-09-03T08:09:32.9517405Z INFO: Scanning...
2020-09-03T08:09:32.9522339Z INFO: Authenticating to destination using Azure AD
2020-09-03T08:09:32.9740801Z INFO: Any empty folders will not be processed, because source and/or destination doesn't have full folder support
2020-09-03T08:09:33.3046665Z
2020-09-03T08:09:33.3052949Z Job 1a53d53d-8582-1844-7089-9d7eba959b68 has started
2020-09-03T08:09:33.3058931Z Log file is located at: C:\windows\ServiceProfiles\NetworkService.azcopy\1a53d53d-8582-1844-7089-9d7eba959b68.log
2020-09-03T08:09:33.3063581Z
2020-09-03T08:09:33.3068880Z
2020-09-03T08:09:35.3096495Z 0.0 %, 0 Done, 0 Failed, 739 Pending, 0 Skipped, 739 Total,
2020-09-03T08:09:35.3103134Z
2020-09-03T08:09:35.3108702Z
2020-09-03T08:09:35.3114274Z Job 1a53d53d-8582-1844-7089-9d7eba959b68 summary
2020-09-03T08:09:35.3119430Z Elapsed Time (Minutes): 0.0334
2020-09-03T08:09:35.3124638Z Number of File Transfers: 739
2020-09-03T08:09:35.3130054Z Number of Folder Property Transfers: 0
2020-09-03T08:09:35.3135190Z Total Number of Transfers: 739
2020-09-03T08:09:35.3140345Z Number of Transfers Completed: 0
2020-09-03T08:09:35.3145789Z Number of Transfers Failed: 739
2020-09-03T08:09:35.3151086Z Number of Transfers Skipped: 0
2020-09-03T08:09:35.3156804Z TotalBytesTransferred: 0
2020-09-03T08:09:35.3162849Z Final Job Status: Failed
2020-09-03T08:09:35.3173631Z

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,836 questions
{count} votes

Accepted answer
  1. Sumarigo-MSFT 44,586 Reputation points Microsoft Employee
    2020-09-28T05:17:15.617+00:00

    @Jigarkumar Patel Updating the Offline discussion, which could benefits other community members who is reading this thread.

    If they manually log in to another AD principal that has appropriate permissions, yeah, it should work. However, if you want the azure release pipeline to work with the service principal name or managed service identity, you need to assign it appropriate permissions.

    Using Storage Explorer, on a folder, container, file, or otherwise, the end user can hit “Manage Access”

    28549-capture.jpg

    And then add the AD user GUID to the table with appropriate permissions.

    28517-capture.jpg

    Hope this helps!

    Kindly let us know if the above helps or you need further assistance on this issue.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------

    Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Sumarigo-MSFT 44,586 Reputation points Microsoft Employee
    2020-09-17T10:34:16.607+00:00

    @Jigar Patel Since we haven't heard back from you, If the issue still persist, I would recommend please send the fully copy logs or I would recommend you to contact support, so If you have a support plan, I request you file a support ticket, else please do let us know, we will try and help you get a one-time free technical support. In this case, could you send an email to AzCommunity[at]Microsoft[dot]com referencing this thread as well as your subscription ID. Please mention "ATTN subm" in the subject field. Thank you for your cooperation on this matter and looking forward to your reply.

    0 comments No comments

  2. Jigarkumar Patel 21 Reputation points
    2020-09-17T11:48:03.643+00:00

    25516-tasklog-9-log.txt

    Please find the full log