SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have implemented a feature in my solution where by the current user's Name is assigned to a field. With certain users - this appears as 'System Account'. Is it possible that if somebody is the site collection admin., for example, this will happen? I can't work out why.

share|improve this question
Does your feature use RunWithElevatedPrivileges at all? How are you getting the current user object? – TZHX Dec 5 '12 at 11:03
@TZHX - I am indeed. I've just done some reading around and now appreciate that using elevate privleges to update an item sets it as modified by and authored by the system account. I need both to be the current user. – JᴀʏMᴇᴇ Dec 5 '12 at 11:20
Indeed. It's a common problem. What sort of context is the code running in (EventReceiver, etc.)? Some make it easier to work around than others. – TZHX Dec 5 '12 at 11:23
It's all functionality that supports a customised 'document upload' feature. I'm successfully setting file.Item["Author"] and file.Item["Modified By"] but for some reason (when retrieving the newly uploaded document) File.Item.Author is still System Account!? Thanks a lot for your reply. – JᴀʏMᴇᴇ Dec 5 '12 at 11:24
Also - I've set file.Item["Created By"] aswell, but the problem still persists. – JᴀʏMᴇᴇ Dec 5 '12 at 11:26

CHeck the Central admin and go to Web application and see the user policy from ribbon and see if some account is added as to be run under system account

share|improve this answer

Trying using properties.UserLoginName rather than geting the user name from the context objects (as the context is running under elevated credentials).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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