File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
shell/agents/Microsoft.Azure.Agent Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -357,6 +357,7 @@ internal class UserAccessToken
357357{
358358 private readonly TokenRequestContext _tokenContext ;
359359 private AccessToken ? _accessToken ;
360+ private const string AiShellAppId = "04b07795-8ddb-461a-bbee-02f9e1bf7b46" ; // Use Azure Cli's Application Id for now
360361
361362 /// <summary>
362363 /// The access token.
@@ -386,7 +387,8 @@ internal async Task CreateOrRenewTokenAsync(CancellationToken cancellationToken)
386387
387388 if ( needRefresh )
388389 {
389- _accessToken = await new AzureCliCredential ( )
390+ _accessToken = await new ChainedTokenCredential ( new AzureCliCredential ( ) ,
391+ new InteractiveBrowserCredential ( AiShellAppId ) )
390392 . GetTokenAsync ( _tokenContext , cancellationToken ) ;
391393 }
392394 }
You can’t perform that action at this time.
0 commit comments