AzCopy Copy Between Blob Storage Fails with "CannotVerifyCopySource" Error

Dodi Darundriyo 0 Reputation points
2024-10-11T13:24:55.68+00:00

When attempting to copy files between blob storage accounts from different tenants, the following error message is encountered during the PUT operation:

RESPONSE Status: 403 This request is not authorized to perform this operation using this resource type.
   Content-Length: 273
   Content-Type: application/xml
   Date: Fri, 11 Oct 2024 13:02:43 GMT
   Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
   X-Ms-Client-Request-Id: 4ba46318-1a44-4944-42c3-e1faa83cf09f
   X-Ms-Error-Code: CannotVerifyCopySource
   X-Ms-Request-Id: 158280b7-901e-0003-41dd-1b3067000000
   X-Ms-Version: 2023-08-03
Response Details: <Code>CannotVerifyCopySource</Code><Message>This request is not authorized to perform this operation using this resource type. </Message>
2024/10/11 13:02:43 ERR: [P#0-T#2] COPYFAILED: https://storagename.blob.core.windows.net/contvpn/directory/filename.zip : 403 : 403 This request is not authorized to perform this operation using this resource type.. When Put Blob from URL. X-Ms-Request-Id: 158280b7-901e-0003-41dd-1b3067000000

The SAS token and PUT command used are as follows (full list of privileges):

PUT https://deststorage.blob.core.windows.net/contvpn/directory/filename.zip?se=2024-10-18T20%3A59%3A03Z&sig=-REDACTED-&sp=rwdlacupiytfx&spr=https&srt=sco&ss=bfqt&st=2024-10-10T12%3A59%3A03Z&sv=2022-11-02

The allow copy scope configuration is already set for any storage account.

What could be missing in this process?

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.
3,192 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,884 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Sina Salam 11,366 Reputation points
    2024-10-11T13:52:18.02+00:00

    Hello Dodi Darundriyo,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you are having "CannotVerifyCopySource" Error while using AzCopy between Blob Storage

    Using AzCopy is more reliable for cross-tenant blob copy operations, as it automatically handles some of the complexities of SAS token permissions and API differences. However, the error shows that the request is not authorized to perform this operation using this resource type," suggests that the source storage account or the configuration is not fully authorized for cross-tenant copy operations using a Shared Access Signature (SAS) token.

    First, check your SAS tokens and their permissions - https://zcusa.951200.xyz/en-us/azure/storage/common/storage-sas-overview

    Then, check CORS Configuration for Azure Storage setting - https://zcusa.951200.xyz/en-us/azure/storage/blobs/storage-blob-cors?tabs=azure-portal and for more information use the below links:

    https://zcusa.951200.xyz/en-us/azure/storage/common/storage-use-azcopy-blobs-copy?toc=/azure/storage/blobs/toc.json

    https://zcusa.951200.xyz/en-us/azure/storage/common/storage-choose-data-transfer-solution

    Also, if your data is large use the previous answer on this platform as it shown below - https://zcusa.951200.xyz/en-us/answers/questions/646038/copy-files-from-one-azure-subscription-to-another

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.


  2. Dodi Darundriyo 0 Reputation points
    2024-10-14T08:52:59.1233333+00:00

    I have found the solution. Turns out the problem was not on the storage account permission of source/target or SAS token.

    The problem is on the container access level. I have to change from private to either blob or container anonymous access level.

    Thank you

    0 comments No comments

  3. Nehruji R 7,811 Reputation points Microsoft Vendor
    2024-10-14T09:32:40.2733333+00:00

    Hello Dodi Darundriyo, I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer. Accepted answers show up at the top, resulting in improved discoverability for others.

    Issue: Customer unable to copy data between Blob Storage from different tenants using AzCopy

    Error Message:

    CannotVerifyCopySource" Error while using AzCopy between Blob Storage

     

    Solution: Customer have changed the container access level from private to either blob or container anonymous access level.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.