title: Access Claim values in controller in MVC 5
body: <p>I have used OWIN authentication in my application. </p>
  
  <p><strong>Login Action</strong></p>
  
  <pre><code>var claims = new List&lt;Claim&gt;();
  claims.Add(new Claim(ClaimTypes.Name, result.UserFirstName));            
  claims.Add(new Claim(ClaimTypes.Sid, result.UserID.ToString()));
  var identity = new ClaimsIdentity(claims, DefaultAuthenticationTypes.ApplicationCookie);
  </code></pre>
  
  <p>I want to access the UserName and UserID from different action. How can I access the values which is added in the claims?</p>
  
  <p><strong>Update</strong>
  I have tried </p>
  
  <pre><code>var claims = new List&lt;Claim&gt;();
  claims.Add(new Claim(ClaimTypes.Name, result.UserFirstName + " " + result.UserLastName));            
  claims.Add(new Claim(ClaimTypes.Sid, result.UserIDNumber.ToString()));
  var identity = new ClaimsIdentity(claims, DefaultAuthenticationTypes.ApplicationCookie);
  var authenticationManager = Request.GetOwinContext().Authentication;
  authenticationManager.SignIn(identity);
  
  var claimsPrincipal = new ClaimsPrincipal(identity);
  Thread.CurrentPrincipal = claimsPrincipal;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/PwBFp.png" alt="enter image description here"></p>
  
  <p>I can view the values inside the quick window. But even though I couldn't access the value. How to get the value?</p>