private Pair<Request, MicrosoftApiResponse> tryWithCreds(Request.Builder requestBuilder)
      throws IOException {
    MicrosoftApiResponse response = sendMicrosoftRequest(requestBuilder);
    if (response.isTokenRefreshRequired()) {
      credentialFactory.refreshCredential(credential);
      client = httpClientBuilder.build(); // reset any old pool of maybe-keepalive connections

      monitor.info(() -> "Refreshed Microsoft authorization token successfuly");
      requestBuilder.header("Authorization", "Bearer " + credential.getAccessToken());
      response = sendMicrosoftRequest(requestBuilder);
    }
    return Pair.of(requestBuilder.build(), response);
  }
Try request twice: once and if there's an unauthorized error, then just once more after
refreshing creds.

<p>Prefer {@link tryWithCredsOrFail} to avoid repetitive error-handling edge-cases (and thus
possibly introducing new bugs).
extensions/data-transfer/portability-data-transfer-microsoft/src/main/java/org/datatransferproject/transfer/microsoft/media/MicrosoftMediaImporter.java