I have a integration with Azure Storage. I'm downloading blobs, moving them to archive folder. Authentication is done with SAS token, works fine with standard token. But when token is IP restricted I can download a package but cannot move it around container. It throws error on StartCopyFromUri.
internal void DownloadBlobPackages()
{
this.containerClient = new BlobClient(new Uri("token")).GetParentBlobContainerClient();
Azure.Pageable<BlobItem> blobList = this.containerClient.GetBlobs(prefix: settings.AzureSettings.AzureUntranslatedBlobsFolder);
if (blobList.Any())
{
foreach (BlobItem blobItem in blobList)
{
BlobClient sourceBlobClient = this.containerClient.GetBlobClient(blobItem.Name);
BlobClient tgtBlobClient = this.containerClient.GetBlobClient("arhivefolder/"+ sourceBlobClient.Name);
tgtBlobClient.StartCopyFromUri(sourceBlobClient.Uri);
}
}
}
Can anyone please help?