File tree Expand file tree Collapse file tree 2 files changed +4
-36
lines changed
Microsoft.SourceIndexer.Tasks Expand file tree Collapse file tree 2 files changed +4
-36
lines changed Original file line number Diff line number Diff line change @@ -68,28 +68,12 @@ private void ExecuteCore()
6868
6969 if ( string . IsNullOrEmpty ( ClientId ) )
7070 {
71- credentialoptions = new DefaultAzureCredentialOptions
72- {
73- Diagnostics =
74- {
75- LoggedHeaderNames = { "x-ms-request-id" } ,
76- LoggedQueryParameters = { "api-version" } ,
77- IsAccountIdentifierLoggingEnabled = true
78- }
79- } ;
71+ credentialoptions = new DefaultAzureCredentialOptions { } ;
8072 Log . LogMessage ( $ "Trying to use managed identity without default identity") ;
8173 }
8274 else
8375 {
84- credentialoptions = new DefaultAzureCredentialOptions
85- {
86- Diagnostics =
87- {
88- LoggedHeaderNames = { "x-ms-request-id" } ,
89- LoggedQueryParameters = { "api-version" } ,
90- IsAccountIdentifierLoggingEnabled = true
91- } ,
92- ManagedIdentityClientId = ClientId } ;
76+ credentialoptions = new DefaultAzureCredentialOptions { ManagedIdentityClientId = ClientId } ;
9377 Log . LogMessage ( $ "Trying to use managed identity with client id: { ClientId } ") ;
9478 }
9579
Original file line number Diff line number Diff line change @@ -79,28 +79,12 @@ static async Task Main(string[] args)
7979
8080 if ( string . IsNullOrEmpty ( clientId ) )
8181 {
82- credentialoptions = new DefaultAzureCredentialOptions
83- {
84- Diagnostics =
85- {
86- LoggedHeaderNames = { "x-ms-request-id" } ,
87- LoggedQueryParameters = { "api-version" } ,
88- IsAccountIdentifierLoggingEnabled = true
89- }
90- } ;
82+ credentialoptions = new DefaultAzureCredentialOptions { } ;
9183 System . Console . WriteLine ( "Trying to use managed identity without default identity" ) ;
9284 }
9385 else
9486 {
95- credentialoptions = new DefaultAzureCredentialOptions
96- {
97- Diagnostics =
98- {
99- LoggedHeaderNames = { "x-ms-request-id" } ,
100- LoggedQueryParameters = { "api-version" } ,
101- IsAccountIdentifierLoggingEnabled = true
102- } ,
103- ManagedIdentityClientId = clientId } ;
87+ credentialoptions = new DefaultAzureCredentialOptions { ManagedIdentityClientId = clientId } ;
10488 System . Console . WriteLine ( "Trying to use managed identity with client id: " + clientId ) ;
10589 }
10690
You can’t perform that action at this time.
0 commit comments