title: What type of ApplicationBuilder should I use in MSAL.NET? I'm using ASP.NET Core Web Api
body: <p>What I'm trying to achieve is to popup a login browser from MSAL.NET, enter username and password, and used the access token to access Microsoft Graph.</p>
  <p>Right now I used PublicClientApplicationBuilder to execute AcquireTokenInteractive to popup the login by MSAL.</p>
  <p>I'm using ASP.NET Core Web Api.</p>
  <p>The problem is, I'm having issue using PublicClientApplicationBuilder when deployed to IIS. It just stucks and always in Pending state.</p>
  <p>Below is my sample code that always in Pending state when deployed to IIS:</p>
  <pre><code>        var app = PublicClientApplicationBuilder.Create(clientId)
              .WithDefaultRedirectUri()
              .WithTenantId(tenantId)
              .Build();
  
          var result = await app.AcquireTokenInteractive(scopes).ExecuteAsync();
  </code></pre>
  <p>And now I read an article from here: <a href="https://docs.microsoft.com/en-us/answers/questions/91715/msal-acquiretokeninteractive-code-hangs-infinte-lo.html" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/answers/questions/91715/msal-acquiretokeninteractive-code-hangs-infinte-lo.html</a>
  To use the ConfidentialClientApplicationBuilder. Now the problem is there is no execute in ConfidentialClientApplicationBuilder to popup login browser from MSAL just like the AcquireTokenInteractive.</p>
  <p>There are only AcquireTokenSilent, AcquireTokenByAuthorizationCode, AcquireTokenOnBehalfOf, and AcquireTokenForClient. But all of these don't seem to popup a login browser from MSAL.NET</p>
  <p>Below is my sample code:</p>
  <pre><code>        var confidentialClientApplication = ConfidentialClientApplicationBuilder
           .Create(clientId)
           .WithTenantId(tenantId)
           .WithClientSecret(clientSecret)
           .Build();
  
          var result = await confidentialClientApplication.AcquireTokenForClient(scopes).ExecuteAsync();
  </code></pre>
  <p>How do I manage to popup a login browser from MSAL by using ConfidentialClientApplicationBuilder?</p>