"RunWithElevatedPrivileges" in SharePoint Timer Jobs?

Can we use SPSecurity.RunWithElevatedPrivileges in SharePoint timer jobs?

Under whose identity will the timer job run under elevated privileges?

Anyone who wants to and should know the facts regarding this will also be appreciated.

+6
sharepoint moss wss sharepoint-2007 timer-jobs
source share
2 answers

RunWithElevatedPrivileges only works if the current thread uses impersonation, that is, IIS. Used in other code (timer jobs, console applications, workflow, etc.). This will have no effect. Colin is right that, by default, the timer service starts as the farm service account specified in the Reconciliation Wizard. You can check this on windows services.

+13
source share

They run under the account that you used when starting the SharePoint Products and Technologies Configuration Wizard for the first time to connect to SQl / launch the Central Admin application pool. those. God account in SharePoint.

+5
source share

All Articles