You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
Which service(blob, file, queue, table) does this issue concern?
Blob
Which version of the SDK was used?
11.2.3
Which platform are you using? (ex: .NET Core 2.1)
.NET Core 3.1
What problem was encountered?
When you create a new container with CloudBlobContainer.CreateIfNotExistsAsync() and then immediately follow that up with CloudBlobContainer.GetPermissionsAsync(), the GetPermissionsAsync method will throw a StorageException with a 404 status code ("The specified resource does not exist."). However, the container does exist (have verified in StorageExplorer)
How can we reproduce the problem in the simplest way?
This only happens if you are using a StorageCredentials built from a TokenCredential
e.g. new CloudStorageAccount(storageCredentials, accountName, endpointSuffix, true);
If you do the same thing with a regular storage account connection string that includes the storage key, it works fine
Have you found a mitigation/solution?
No - have tried sleeping to see if the permissions can be accessed after some time has elapsed, but does not resolve the issue. Have also tried calling GetContainerReference again after the CreateIfNotExistsAsync call but that doesn't help.
The text was updated successfully, but these errors were encountered:
Had a chance to try the same thing with the V12 SDK. Same issue - can't get permissions on a newly created container if you are using Token credentials. Here's some sample code to repro:
varaccountName="someaccount";varblobEndpoint=$"https://{accountName}.blob.core.windows.net";varcredential=new DefaultAzureCredential();varblobServiceClient=new BlobServiceClient(new Uri(blobEndpoint), credential);varcontainerName="mark-temp1";await blobServiceClient.CreateBlobContainerAsync(containerName, PublicAccessType.None);varcontainerClient= blobServiceClient.GetBlobContainerClient(containerName);varpolicy=await containerClient.GetAccessPolicyAsync();// will throw 404: The specified resource does not exist
Which service(blob, file, queue, table) does this issue concern?
Blob
Which version of the SDK was used?
11.2.3
Which platform are you using? (ex: .NET Core 2.1)
.NET Core 3.1
What problem was encountered?
When you create a new container with
CloudBlobContainer.CreateIfNotExistsAsync()
and then immediately follow that up withCloudBlobContainer.GetPermissionsAsync()
, theGetPermissionsAsync
method will throw aStorageException
with a 404 status code ("The specified resource does not exist."). However, the container does exist (have verified in StorageExplorer)How can we reproduce the problem in the simplest way?
This only happens if you are using a
StorageCredentials
built from aTokenCredential
e.g.
new CloudStorageAccount(storageCredentials, accountName, endpointSuffix, true);
If you do the same thing with a regular storage account connection string that includes the storage key, it works fine
Have you found a mitigation/solution?
No - have tried sleeping to see if the permissions can be accessed after some time has elapsed, but does not resolve the issue. Have also tried calling
GetContainerReference
again after theCreateIfNotExistsAsync
call but that doesn't help.The text was updated successfully, but these errors were encountered: