You are developing a script to migrate application logs between two Azure Storage accounts. You need to copy all blobs from a source container named `logs-prod` in a storage account named `srcstorage` to a destination container named `logs-archive` in a storage account named `deststorage`.
You decide to use the Azure CLI for this task and generate a Shared Access Signature (SAS) token for the source container. You execute the following command:
bash
az storage blob copy start-batch \
--destination-container logs-archive \
--account-name deststorage \
--account-key <dest-account-key> \
--source-container logs-prod \
--source-account-name srcstorage \
--source-sas "?sv=2025-01-05&sr=c&sp=r&se=2026-08-01T00:00:00Z&sig=..."
The command fails with an authorization error (`AuthorizationPermissionMismatch`) and no blobs are copied.
Which modification to the source SAS token configuration will resolve the error?
- AAdd the Write (w) permission to the source SAS token so the copy process can write to the source metadata.
- BModify the custom metadata on the source blobs to ensure all header keys are strictly in lowercase to prevent header authorization mismatches.
- Add the List (l) permission to the source SAS token at the container level.Answer
- DAcquire an active blob lease on the destination blobs and append the lease ID parameter to the source SAS token.