We have implemented a simple workflow in a SharePoint List. The workflow is configured to triggered on list item creation. The site is consuming a provider hosted app which has logic to create new list items in the above mentioned list. ISSUE: The workflow is not getting triggered if item is created from the SharePoint app. Errors from logs are as below:
"Declarative workflows cannot automatically start if the triggering action was performed by an App-Only request. Canceling workflow auto-start."
---
"Trusted provider is missing. Provider: '00000003-0000-0ff1-ce00-000000000000'"
-----
SPRequest.GetListsWithCallback: UserPrincipalName=i:0i.t|00000003-0000-0ff1-ce00-000000000000|app@sharepoint, AppPrincipalName= ,bstrUrl=xxxxxxxxx,foreignWebId=00000000-0000-0000-0000-000000000000 ,bstrListInternalName={600E83A7-BBD7-45CC-9722-BAE24CF74EBB} ,dwBaseType=-1 ,dwBaseTypeAlt=-1 ,dwServerTemplate=-1 ,dwGetListFlags=0 ,dwListFilterFlags=4294967295 ,bPrefetchMetaData=False ,bSecurityTrimmed=True ,bGetSecurityData=True ,bPrefetchRelatedFields=False
----
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace: at Microsoft.SharePoint.SPListCollection.EnsureListsData(Guid webId, String strListName) at Microsoft.SharePoint.SPListCollection.ItemByInternalName(String strInternalName, Boolean bThrowException) at Microsoft.SharePoint.SPListCollection.GetListById(Guid uniqueID, Boolean bThrowException) at phM=.xhM=.zhM=(List`1 zxM=, Boolean 0BM=, SPWeb 0RM=) at Nintex.Workflow.Activities.QueryListActivity.PerformListQuery(XmlNode caml, SPWeb web, NWWorkflowContext ctx, Int32 _itemLimit, Int32 _UnlimitedItemCount) at Nintex.Workflow.Activities.QueryListActivity.Execute(ActivityExecutionContext executionContext) .....................
Request your help to solve this. Thanks in advance.