diff --git a/shell/agents/Microsoft.Azure.Agent/Schema.cs b/shell/agents/Microsoft.Azure.Agent/Schema.cs index 2575e815..6726044d 100644 --- a/shell/agents/Microsoft.Azure.Agent/Schema.cs +++ b/shell/agents/Microsoft.Azure.Agent/Schema.cs @@ -357,6 +357,7 @@ internal class UserAccessToken { private readonly TokenRequestContext _tokenContext; private AccessToken? _accessToken; + private const string ApplicationId = "04b07795-8ddb-461a-bbee-02f9e1bf7b46"; // AppId that need to be configurated in orchestrator side. Use Azure Cli's Application Id for now /// /// The access token. @@ -386,7 +387,8 @@ internal async Task CreateOrRenewTokenAsync(CancellationToken cancellationToken) if (needRefresh) { - _accessToken = await new AzureCliCredential() + _accessToken = await new ChainedTokenCredential(new AzureCliCredential(), + new InteractiveBrowserCredential(ApplicationId)) .GetTokenAsync(_tokenContext, cancellationToken); } }