1

I'm curious whether or not all timer jobs will always run under the same farm service account, i.e. SPFarm.Local.DefaultServiceAccount as specified at installation. For example, if farm service account specified at installation is domain\FarmServiceAccount, will all timer jobs use this account to execute their code? Would this apply to all timer jobs in web application level, or farm level?

The only situation I can think of that this will not be true is obviously if farm service account is changed to something else post-installation. Is this correct?

Background: I'd like to programatically retrieve timer service account name and store it somewhere. I'd like to make sure that this name is equal to SPFarm.Local.DefaultServiceAccount for all timer jobs.

2 Answers 2

1

The sure way will be to get SPFarm.Local.TimerService.ProcessIdentity.UserName

2

All timer jobs will run under the context of Sharepoint 2010 timerservice context.

Timer service Context

5
  • Do you perhaps know if this account is equal to SPFarm.Local.DefaultServiceAccount, or is this not necessarily so? The reason is that I'd like to find timer service account name programmatically.
    – w128
    Commented May 15, 2014 at 12:28
  • As far as i know, I don't think that is equal to SPFarm.Local.DefaultService Account.
    – Aanchal
    Commented May 15, 2014 at 12:32
  • MSDN states: "The server farm account is also referred to as the database access account and is used as the application pool identity for Central Administration, and as the process account for the Microsoft SharePoint Foundation 2010 Timer service." So I'd at least assume it would be the same as DefaultServiceAccount, but I'm not 100% ...
    – w128
    Commented May 15, 2014 at 12:36
  • You can test this. If you getting same account in SPFarm.Local.DefaultService Account and timer service account.
    – Aanchal
    Commented May 15, 2014 at 12:38
  • I am for my specific environment - but I'm not sure if this will be true for every environment out there.
    – w128
    Commented May 15, 2014 at 12:39

Your Answer

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

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