@@ -256,13 +256,7 @@ public static void Configure(this SymbolReaderAuthenticationHandler handler, Aut
256256 /// <returns>This instance for fluent chaining.</returns>
257257 public static SymbolReaderAuthenticationHandler AddSymwebAuthentication ( this SymbolReaderAuthenticationHandler httpHandler , TextWriter log , bool silent = false )
258258 {
259- DefaultAzureCredentialOptions options = new DefaultAzureCredentialOptions
260- {
261- ExcludeInteractiveBrowserCredential = silent ,
262- ExcludeManagedIdentityCredential = true // This is not designed to be used in a service.
263- } ;
264-
265- return httpHandler . AddHandler ( new SymwebHandler ( log , new DefaultAzureCredential ( options ) ) ) ;
259+ return httpHandler . AddHandler ( new SymwebHandler ( log , CreateTokenCredential ( ) ) ) ;
266260 }
267261
268262 /// <summary>
@@ -285,13 +279,7 @@ public static SymbolReaderAuthenticationHandler AddGitCredentialManagerAuthentic
285279 /// <returns>This instance for fluent chaining.</returns>
286280 public static SymbolReaderAuthenticationHandler AddAzureDevOpsAuthentication ( this SymbolReaderAuthenticationHandler httpHandler , TextWriter log , bool silent = false )
287281 {
288- DefaultAzureCredentialOptions options = new DefaultAzureCredentialOptions
289- {
290- ExcludeInteractiveBrowserCredential = silent ,
291- ExcludeManagedIdentityCredential = true // This is not designed to be used in a service.
292- } ;
293-
294- return httpHandler . AddHandler ( new AzureDevOpsHandler ( log , new DefaultAzureCredential ( options ) ) ) ;
282+ return httpHandler . AddHandler ( new AzureDevOpsHandler ( log , CreateTokenCredential ( ) ) ) ;
295283 }
296284
297285 /// <summary>
@@ -307,6 +295,13 @@ public static SymbolReaderAuthenticationHandler AddGitHubDeviceCodeAuthenticatio
307295 public static SymbolReaderAuthenticationHandler AddBasicHttpAuthentication ( this SymbolReaderAuthenticationHandler httpHandler , TextWriter log , Window mainWindow )
308296 => httpHandler . AddHandler ( new BasicHttpAuthHandler ( log ) ) ;
309297
298+ private static ChainedTokenCredential CreateTokenCredential ( )
299+ {
300+ return new ChainedTokenCredential (
301+ new VisualStudioCredential ( ) ,
302+ new InteractiveBrowserCredential ( ) ) ;
303+ }
304+
310305 /// <summary>
311306 /// Get the HWND of the given WPF window in a way that honors WPF
312307 /// threading rules.
0 commit comments