@@ -79,7 +79,7 @@ public async Task<List<string>> ListDatabases(string subscriptionId, string clus
7979 {
8080 ValidateRequiredParameters ( subscriptionId , clusterUri ) ;
8181
82- var kcsb = CreateKustoConnectionStringBuilder (
82+ var kcsb = await CreateKustoConnectionStringBuilder (
8383 clusterUri ,
8484 authMethod ,
8585 null ,
@@ -99,7 +99,7 @@ public async Task<List<JsonDocument>> QueryItems(string subscriptionId, string c
9999 {
100100 ValidateRequiredParameters ( subscriptionId , clusterUri , databaseName , query ) ;
101101
102- var kcsb = CreateKustoConnectionStringBuilder (
102+ var kcsb = await CreateKustoConnectionStringBuilder (
103103 clusterUri ,
104104 authMethod ,
105105 null ,
@@ -121,7 +121,7 @@ public async Task<List<JsonDocument>> QueryItems(string subscriptionId, string c
121121 return results ;
122122 }
123123
124- private KustoConnectionStringBuilder CreateKustoConnectionStringBuilder (
124+ private async Task < KustoConnectionStringBuilder > CreateKustoConnectionStringBuilder (
125125 string uri ,
126126 AuthMethod ? authMethod ,
127127 string ? connectionString = null ,
@@ -137,7 +137,7 @@ private KustoConnectionStringBuilder CreateKustoConnectionStringBuilder(
137137 return new KustoConnectionStringBuilder ( connectionString ) ;
138138 case AuthMethod . Credential :
139139 default :
140- var credential = GetCredential ( tenant ) . GetAwaiter ( ) . GetResult ( ) ;
140+ var credential = await GetCredential ( tenant ) ;
141141 var builder = new KustoConnectionStringBuilder ( uri ) . WithAadAzureTokenCredentialsAuthentication ( credential ) ;
142142 if ( ! string . IsNullOrEmpty ( tenant ) )
143143 {
0 commit comments