Skip to content

Commit 673b555

Browse files
committed
fix: update BlobServiceClient construction to use DefaultAzureCredential
1 parent 66465df commit 673b555

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Web/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Web.Services;
88
using Microsoft.AspNetCore.Rewrite;
99
using Azure.Storage.Blobs;
10+
using Azure.Identity;
1011

1112
var builder = WebApplication.CreateBuilder(args);
1213

@@ -144,7 +145,7 @@
144145
if (Uri.IsWellFormedUriString(connectionString, UriKind.Absolute))
145146
{
146147
// If the connection string is a URI, use it directly
147-
return new BlobServiceClient(new Uri(connectionString));
148+
return new BlobServiceClient(new Uri(connectionString), new DefaultAzureCredential());
148149
}
149150
else
150151
{

0 commit comments

Comments
 (0)