0
votes

I have a .NET webpage that calls a PowerShell script. The PowerShell script adds a new list item to a SharePoint list and should automatically trigger a SharePoint workflow on add.

When I log into the server as a domain\admin account and run this script directly from the PowerShell window, the item is added to the list and the workflow is kicked off successfully.

However, when I call the same PowerShell script from the .NET webpage, the script is called, the item is added to the SharePoint list, but the workflow is not automatically triggered. The app pool runs as the same domain\admin account that I logged in as to run the script directly - so permissions should be the same.

(I have also tried to programatically call the workflow from the script, with no success.) This is SharePoint 2010, .NET 4.0, PowerShell 64-bit, Windows 2008 R2

Is this a permissions issue? Any ideas?

1

1 Answers

0
votes

My idea is that it is the permissions issue. Check who is the creator of the item when you create the item from the page (and the WF fails) and check who is the creator of the item when you create the items from the admin account from PS (and the WF kicks off).

Is there a requirement to demand Manage List permission to start the workflow? Have you tried to analyse the ULS logs to find more info?