Anonymous users and SharePoint workflows: The Problem

Simply put, you can't trigger a workflow from an anonymous user.  The workflow must run in the context of the current user account, and of course there isn't one when you're anonymous.  If you do try it, you'll probably see the following error:

 The data source control failed to execute the insert command.

This is misleading because the item does get added to the list.  It's the subsequent event (start workflow) that gets confused and curls up in a fetal position while humming manic strains of obscure nursery rhymes.

Since most people seem to think it's impossible to do this, I'm going to give it a try.  Hopefully I'll have some meaningful results to share soon.

4 Comments

  • Scott:

    To be clear, let me make sure I understand this correctly.

    1) Are you adding these items as an anonymous user? If not, does the user have rights to do what is being done in the workflow?

    2) Is there anything relevant in the SharePoint logs?

    3) Does the workflow history tell you anything useful?

    4) Is the list item actually created even though the workflow fails?

    5) Have you tried writing to the workflow history between steps to find out exactly which step is failing?

  • Hi there!

    I do have the same problem, but in an even simpler form. I don't have a workflow, I just have en event handler that can never get fired because of the anonymous user.

    Have you found any kind of solution for this? I've been searching everywhere with no avail...

    Thanx

  • Just for the record, I haven't found a way around this yet. At this point I'm hoping that SP 2010 has something better for us... BUT I also have a new idea for something completely different that may get us around this particular snafu, so stay tuned.

  • I attempted this using "SPSecurity.RunWithElevatedPrivileges" as I've seen recommended elsewhere, but I still get the error...

    -Ted

Comments have been disabled for this content.