Get current User Id in ASP.NET MVC5

Get Current UserId in ASP.NET MVC5 var userId = User.Identity.GetUserId(); You must add this namespace :) using Microsoft.AspNet.Identity;

December 26, 2014 · 1 min