ResourceContainerAccessDenied: Access for one of the specified Azure Blob container(s) is denied RRS feed

  • Question

  • I'm unable to get the start task to copy the application files from a blob container.  The batch account is configured to use the storage account where the application files are stored.  I've resynched the keys, given the container public read access, and tried the task admin user.  Always get the access is denied error and my googlefu is failing me.  Any suggestions welcomed.
    Friday, April 17, 2020 10:43 PM

All replies

  • OK, so the following doesn't work for whatever reason:

          // Set the expiry time and permissions for the blob shared access signature. In this case, no start time is specified,
          // so the shared access signature becomes valid immediately
          SharedAccessBlobPolicy sasConstraints = new SharedAccessBlobPolicy
            SharedAccessExpiryTime = DateTime.UtcNow.AddHours(24),
            Permissions = SharedAccessBlobPermissions.Read | SharedAccessBlobPermissions.List
          // Construct the SAS URL for blob
          string sasBlobToken = blobData.GetSharedAccessSignature(sasConstraints);
          string blobSasUri = $"{blobData.Uri}{sasBlobToken}";
          return ResourceFile.FromStorageContainerUrl(blobSasUri);

    But this does:

    return ResourceFile.FromAutoStorageContainer(containerName);

    Saturday, April 18, 2020 2:35 AM