diff --git a/tools/BlobRewriter/Program.cs b/tools/BlobRewriter/Program.cs index dd70584c22..7107f44f8a 100644 --- a/tools/BlobRewriter/Program.cs +++ b/tools/BlobRewriter/Program.cs @@ -404,7 +404,7 @@ private static BlobContainerClient GetContainer(string storageConnectionString, { try { - var blobServiceClient = string.IsNullOrEmpty(storageUri) ? new BlobServiceClient(storageConnectionString) : new BlobServiceClient(new Uri(storageUri), string.IsNullOrEmpty(storageUAMI) ? new InteractiveBrowserCredential() : new ManagedIdentityCredential(storageUAMI)); + var blobServiceClient = string.IsNullOrEmpty(storageUri) ? new BlobServiceClient(storageConnectionString) : new BlobServiceClient(new Uri(storageUri), string.IsNullOrEmpty(storageUAMI) ? new DefaultAzureCredential() : new ManagedIdentityCredential(storageUAMI)); var blobContainerClient = blobServiceClient.GetBlobContainerClient(storageContainerName); if (!blobContainerClient.Exists()) diff --git a/tools/PerfTester/Program.cs b/tools/PerfTester/Program.cs index d74cde4e6b..8ff7414b31 100644 --- a/tools/PerfTester/Program.cs +++ b/tools/PerfTester/Program.cs @@ -731,7 +731,7 @@ private static BlobContainerClient GetContainer(string storageConnectionString, { try { - var blobServiceClient = string.IsNullOrEmpty(storageUri) ? new BlobServiceClient(storageConnectionString) : new BlobServiceClient(new Uri(storageUri), string.IsNullOrEmpty(storageUAMI) ? new InteractiveBrowserCredential() : new ManagedIdentityCredential(storageUAMI)); + var blobServiceClient = string.IsNullOrEmpty(storageUri) ? new BlobServiceClient(storageConnectionString) : new BlobServiceClient(new Uri(storageUri), string.IsNullOrEmpty(storageUAMI) ? new DefaultAzureCredential() : new ManagedIdentityCredential(storageUAMI)); var blobContainerClient = blobServiceClient.GetBlobContainerClient(storageContainerName); if (!blobContainerClient.Exists())