Az Storage Blob Copy Start does not support SASConnectionString whereas other az storage blob commands do.
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62
**Describe the bug**
I generated a SASConnectionString that looks like this:
```
$ConnectionString = '"BlobEndpoint=https://.blob.core.windows.net/;QueueEndpoint=https://.queue.core.windows.net/;FileEndpoint=https://.file.core.windows.net/;TableEndpoint=https://.table.core.windows.net/;SharedAccessSignature=sv=&ss=&se=&spr=https&sig="'
```
I am trying to authenticate the copy command as follows:
```
az storage blob copy start `
--account-name `
--source-container `
--source-blob `
--destination-blob `
--destination-container `
--connection-string $ConnectionString
```
However, this returns the following error:
```
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. ErrorCode: CannotVerifyCopySource
CannotVerifyCopySourceServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:1c2d9191-f01e-0021-3b0f-ae6f7c000000
Time:2020-10-29T16:22:40.5248427Z
```
When I try to use the same connection string for the following command, it works.
```
az storage blob download-batch `
-d `
-s `
--connection-string $ConnectionString
```
**To Reproduce**
Try running both the commands with same SASConnectionString and the copy command will fail whereas the download-batch will work.
**Expected behavior**
The az storage blob copy start should work just like the az storage blob download-batch command and should be able to use the SAS ConnectionString
**Environment summary**
az version
{
"azure-cli": "2.14.0",
"azure-cli-core": "2.14.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"storage-preview": "0.4.0"
}
}
**Additional context**
Note that the az storage copy command works with the Access Key Connection String. However, I specifically want to use the Connection String that contains the SAS token.
Contributor guide
Assessment
This issue has not been assessed yet.