Reputation: 31
I am trying to make an arm template deployment in tenant A. One of the parameters in the json file is a SAS uri pointing to a blob in a storage account in tenant B. I generated a token with full read/write/add...etc + http/https permissions for the blob in tenant B and put it in but it is being rejected with message:
BlobDownloadFailed\",\r\n \"message\": \"Microsoft.Azure.Storage.StorageException: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\\r\\n at Microsoft.Azure.Storage.Core.Executor.Executor
What seems to be happening is that ARM is accepting the deployment and trying to pull the blob from the storage account with the SAS provided but the storage account is rejecting it. The deployment works when I try it with a SAS for a blob located in the same resource group + tenant. My understanding (which is likely incorrect) was that having the sas token itself generated with the right permissions was enough to be used cross tenant. Are there additional steps needed when doing an arm deployment which is accessing resources in a different tenant and resource group, such as having app registration...etc?
Upvotes: 1
Views: 944
Reputation: 10455
BlobDownloadFailed",\r\n "message": "Microsoft.Azure.Storage.StorageException: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\r\n at Microsoft.Azure.Storage.Core.Executor.Executor
The above error may occurs of restriction so please check the below points:
Azure portal->storage account->Access control(IAM)->Add role assignments->storage blob contributor role.
Server failed to authenticate the request
.pleas echeck your storage is whitelisted to access as by default its ip
is 127.0.0.1:10000.Azure Portal -> Storage Account -> Networking -> Check Allow Access From (All Networks / Selected Networks)
If it is "Selected Networks" - It means the storage account is firewall enabled.
https://< Storageaccountname >.blob.core.windows.net/< container name>/< Filename >?sp=r&st=2022-09-05T13:02:10Z&se=2022-09-05T21:02:10Z&spr=https&sv=2021-06-08&sr=b&sig=BL2%2Bwo157%2FMfll0NJpx3bO4yIh6P%2B2hDjZwu8
SAS
is valid. If any of these are incorrect, you may receive a "Failed to Authenticate"
message.Reference: Grant limited access to data with shared access signatures (SAS) - Azure Storage | Microsoft Docs
Upvotes: 1