Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

As far as I understand, the workflows created in SharePoint designer that should launch under the credentials of the system account will no longer start automatically. So what should we do in cases when code is running under elevated privileges. Is there any way other than initiating workflows programmatically through code?

share|improve this question

2 Answers 2

It's not a problem I've come across, but you could try impersonating another user, rather than elevating privileges:

// Using the User Token for the System Account is like running with elevated privileges.
SPUserToken userToken = ... 
using (SPSite site = new SPSite(url, userToken ))
{
   using (SPWeb web = site.OpenWeb())
   {
       //Do Stuff
   }
}
share|improve this answer

We talking 2010?

If so, insert an impersonation step in the workflow and drop in your desired actions. Publish the workflow. The operations within that impersenation step will run in the context of who published the workflow, i.e. someone with full control access to the site.

share|improve this answer

Your Answer

 
discard

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.