Azure / azure-storage-azcopy

The new Azure Storage data transfer utility - AzCopy v10
MIT License
610 stars 220 forks source link

AzCopy Copy Between Blob Storage Fails with "CannotVerifyCopySource" Error #2829

Open ndriyo opened 1 week ago

ndriyo commented 1 week ago

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.

I'm already using the latest azcopy 10.26.00 from Azure Portal shell.

What could be missing?

ashruti-msft commented 6 days ago

Are you generating the SAS token on an account level or blob level? It could be some permissions are missing.