title: How to extend access token in ASP.NET SDK sample
body: <p>My application is based on ASP.NET SDK sample for Microsoft graph from here: <a href="https://developer.microsoft.com/en-us/graph/docs/get-started/aspnetmvc" rel="nofollow noreferrer">https://developer.microsoft.com/en-us/graph/docs/get-started/aspnetmvc</a></p>
  
  <p>I successfully build an application which manages calendars (meeting rooms), but I come across the problem that user is logged out after 1 hour. Application is based on OpenID and lifetime of access token is 1 hour. I would assume that in SDK sample would automatically extend lifetime of access token through code bellow, so that I would not implement refresh token by self:</p>
  
  <pre><code>var cca = new ConfidentialClientApplication(appId, redirectUri, new ClientCredential(appSecret), tokenCache);
  var result = await cca.AcquireTokenSilentAsync(scopes);
  </code></pre>
  
  <p>I was trying playing around with cookie and authentication options, but I want successful:</p>
  
  <pre><code>var cookieAuthenticationOptions = new CookieAuthenticationOptions();
  cookieAuthenticationOptions.ExpireTimeSpan = TimeSpan.FromMinutes(90);
  cookieAuthenticationOptions.SlidingExpiration = false;
  
  new OpenIdConnectAuthenticationOptions{ UseTokenLifetime = true }
  </code></pre>
  
  <p>So basically I would like to know, how to keep user signed in for 90 days in my application so user don’t need to enter his credentials every hour.
  <br/></p>
  
  <ol>
  <li>Is it possible to do that in sample SDK or do I need to implement it manually?
  <br/></li>
  <li>If is it possible by SDK, what should I change or how to set it up?</li>
  </ol>
  
  <p>Thank you very much for your help.</p>