3
votes

What user context do SharePoint timer jobs run under? The farm account?

I'm going to be accessing some external resources (network share) via the timer job, so I need to know which SharePoint service account to grant permissions.

3

3 Answers

11
votes

Yes, in all documents in Technet, it's "SharePoint farm account".

In fact, it's the user which run the OWSTimer job.

4
votes

The windows identity will be as described above, i.e. the identity of the OWSTimer service. In accessing SharePoint resources, however, a SPTimerJob will use the SPUser identity of SharePoint\System. You can check this by creating a timer job to modify a list item - the "modified by" user friendly name will be "System Account" not the domain\user windows identity of the OWSTimer service.

0
votes

I believe so. According to this blog post, http://meenrajan.blogspot.com/2008/08/sharepoint-timer-job.html you can check the identity of what's running it by doing the following:

"you may go to the Task Manager, and find the w3wp.exe process that is running and see what account it has been using to figure out what was the account used to run the job.update(). Otherwise, you can also, do a SQL Trace on your Sharepoint Configuration Database and find the account used"