title: How to stay logged in with azure cli?
body: <p>We are using the azure cli to gather metrics for monitoring. Today the az cli failed with this error message.</p>
  <blockquote>
  <p>AADSTS70043: The refresh token has expired or is invalid due to
  sign-in frequency checks by conditional access. The token was issued
  on 2020-10-20T21:55:46.8597518Z and the maximum allowed lifetime for
  this request is 43200. Trace ID: ebdc2968-169d-46d2-b708-f93f8f151700
  Correlation ID: 3d2c369b-bf7a-48e3-9add-6c1ef41ae41b Timestamp:
  2021-01-25 17:35:51Z</p>
  </blockquote>
  <p>To get it working again I had to do <code>az login</code> and reauthenticate.</p>
  <p>How long will the account stay logged in before having to reauthenticate again? Is there a way to keep it logged in for longer, or to configure things such that manually reauthenticating isn't necessary?</p>