Azure Copy Permissions Error

2022-01-02

When running my legacy pipeline on Azure devops I ran into the following issue when running AZCopy.

2020-11-15T12:30:03.1523563Z ##[error]Upload to container: 'css' in storage
account: 'tmdn' with blob prefix: '' failed with error: 'AzCopy.exe exited with
non-zero exit code while uploading files to blob storage.' For more info please
refer to https://aka.ms/azurefilecopyreadme

After some investigation I discovered that I had to apply the following roles to the service principal at the Storage Account IAM level:

  • Storage Blob Data Contributor
  • Storage Blob Data Owner

Once the above roles were applied the issue was resolved and I was able to copy items into Azure Storage.