title: Azure AD login using C#. Acquiring Refresh token and Access token
body: <p><strong>Task:</strong> I need to create a WPF application, which will work with EWS(Exchange web-service). I, also, have the 2 restrictions:</p>
  <ul>
  <li>login should proceed only once (it should use refresh token to reconnect)</li>
  <li>it should support 2FA</li>
  </ul>
  <p><strong>My solution part:</strong> I use OAuth to connect to Azure AD. As OAuth client I use Microsoft.Identity.Client. For the first login I have such code:</p>
  <pre><code>var pcaOptions = new PublicClientApplicationOptions
  {
      ClientId = *my_client_id*,
      TenantId = *my_tenant*
  };
  AuthenticationResult authResult = pca.AcquireTokenInteractive(ewsScopes).ExecuteAsync().Result;
  </code></pre>
  <p>This part of code shows up a WPF window, where I input credentials and return me a result(AuthenticationResult), which contains Access Token.</p>
  <p><strong>Problem:</strong> AuthenticationResult doesn't have a Refresh Token, so I can't fulfill the first restriction. Are there any solutions or over ways?</p>
  <p><strong>Additional question:</strong> How to update a Refresh token using Microsoft.Identity.Client?</p>