1

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?

1

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
   }
}
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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