Hi , thanks for the question. The answer is that you need a credential within VS Code - you have two options, either sign in via a terminal window in VS Code using the Az CLI or use the account plug-in as documented here https://learn.microsoft.com/en-us/azure/developer/java/sdk/identity-azure-hosted-auth#default-azure-credential
How to access in azure blob
Anonymous
I have assigned my Azure App Service account and my personal Azure account to the 'Role Assignments' in the 'Access control (IAM)' section of the Blob's access account. While the application deployed on the Azure App Service can access the blob successfully, I'm facing an issue where the application, when run locally in Visual Studio Code from my logged-in Azure account, cannot access the blob. How can I resolve this?
const account = "mock_account";
const url = `https://${account}.blob.core.windows.net`;
const credential = new DefaultAzureCredential();
const blobServiceClient = new BlobServiceClient(url, credential);
1 answer
Sort by: Most helpful
-
Ben Gimblett 4,555 Reputation points Microsoft Employee
2023-08-14T08:25:08.6133333+00:00