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
I need to set CORS policy for Azure Blob Storage but I get an error Azure.RequestFailedException: This request is not authorized to perform this operation using this permission .. I am basically using the code below which works locally (with Emulator). I checked that the Managed Identity has the Storage Blob Data Contributor permissions so I am not sure, what the problem could be... any hint is appreciated
varblobServiceClient= app.Services.GetRequiredService<BlobServiceClient>();varproperties=await blobServiceClient.GetPropertiesAsync();//<--- Error already happens here
properties.Value.Cors =new[]{new BlobCorsRule
{MaxAgeInSeconds=1000,AllowedHeaders="*",AllowedMethods="GET, PUT, POST, DELETE, OPTIONS",AllowedOrigins="https://myurl.com",ExposedHeaders="*"}};// Actawait blobServiceClient.SetPropertiesAsync(properties);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I need to set CORS policy for Azure Blob Storage but I get an error
Azure.RequestFailedException: This request is not authorized to perform this operation using this permission
.. I am basically using the code below which works locally (with Emulator). I checked that the Managed Identity has theStorage Blob Data Contributor
permissions so I am not sure, what the problem could be... any hint is appreciatedBeta Was this translation helpful? Give feedback.
All reactions