public async Task <ActionResult> Register(RegisterViewModel model) { var user = new ApplicationUser { FirstName = model.FirstName, LastName = model.LastName, UserName = model.UserName, Email = model.Email, ZipCode = model.ZipCode }; IdentityResult result = await _userManager.CreateAsync(user, model.Password); if (result.Succeeded) { // string newUserId = this.User.FindFirst(ClaimTypes.NameIdentifier)?.Value; string newUserId = user.Id; Console.WriteLine(">>>>>>>>>>>>>>>>>>>>> YOUR USER ID: " + newUserId); var newAPIUser = new APIUser { UserId = newUserId }; APIUser.Post(newAPIUser); return(RedirectToAction("Login")); } else { return(View()); } }