public async Task <InvokeResult <AuthResponse> > CreateNewAsync([FromBody] RegisterUser newUser) { var result = await _appUserManager.CreateUserAsync(newUser); if (!String.IsNullOrEmpty(newUser.InviteId) && result.Successful) { await _orgManager.AcceptInvitationAsync(newUser.InviteId, result.Result.User.Id); var user = await _appUserManager.GetUserByIdAsync(result.Result.User.Id, OrgEntityHeader, result.Result.User); await _signInManager.SignInAsync(user, false); } return(result); }