When I'm try to get current logged user name for account domain\username and I added many users to this option "Account operates as System" In code I got the system account not the real name of user "Domain\username" and i want the real name and real Id for this used to difference between users all of them are with option "Account operates as System" The code I used :



1 Answer 1


You can try this if I understand you correct?






hope this helps :)

  • its give me the name ok but how to get the id of this user
    – FarOoOosa
    Aug 14, 2012 at 10:13
  • iv just changed the post, lol forgot to add the ID part ;)
    – Ali Jafer
    Aug 14, 2012 at 10:16
  • SPContext.Current.Web.CurrentUser.ID or .Name not works for me that what I was use
    – FarOoOosa
    Aug 14, 2012 at 10:37
  • HttpContext.Current.User.Identity.Name get the name as I want thanks
    – FarOoOosa
    Aug 14, 2012 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.