I am trying to trigger workflow 2, attached to list 2, from an app step of workflow 1, attached to list 1, using Rest API "SP.WorkflowServices.WorkflowInstanceService.StartWorkflowOnListItemBySubscriptionId". Call completes successfully when I use it outside of App step i.e. worflow runs under current user who is a site owner too. But it fails when I use it inside the App Step. ULS log is attached as pdf. Sorry for large page size. I got X-DigestValue Header through REST Api and then immediately called the REST Api to trigger the workflow. Also used headers with "accept: application/json;odata=verbose" and "content-type: application/json;odata=verbose". Workflow history shows me an "internal server" error. I have given full control to workflow app using site app permissions on site and list. I am using SharePoint On-premises 2013. For web application, Claim based authentication with windows integrated NTLM authentication mechanism is being used. Analysis of ULS logs shows System.NotSupportedException: "Do not know how to create outbound claims for app only identity".
Microsoft.Workflow.Client.WorkflowCommunicationException: The request was aborted: The request was canceled. Client ActivityId : 6bf9baee-9f04-e974-8734-bf00c088df47. ---> System.Net.WebException: The request was aborted: The request was canceled. ---> System.NotSupportedException: Do not know how to create outbound claims for app only identity
at Microsoft.SharePoint.IdentityModel.SPIdentityContext.<GetOutboundS2SClaims>d__6.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable
1 collection)
at Microsoft.SharePoint.IdentityModel.OAuth2.SPOAuth2SecurityTokenManager.IssueBearerTokenString(SPServiceContext serviceContext, SPSecurityTokenServiceConnectionInformation stsInfo, OAuth2EndpointIdentity endpointIdentity, SPOAuth2SecurityTokenType tokenType, IEnumerable`1 claims)
at Microsoft.SharePoint.IdentityModel.OAuth2.SPOAuth2BearerCredentials.GetBearerToken(HttpAuthenticationChallenge[] challenges, WebRequest webRequest)
at Microsoft.SharePoint.IdentityModel.OAuth2.OAuth2BearerCredentials.Authenticate(HttpAuthenticationChallenge[] challenges, WebRequest webRequest)
at Microsoft.SharePoint.IdentityModel.OAuth2.OAuth2BearerAuthenticationModule.InternalAuthenticate(String challenge, WebRequest request, OAuth2BearerCredentials oauthCredentials)
at Microsoft.SharePoint.IdentityModel.OAuth2.OAuth2BearerAuthenticationModule.Authenticate(String challenge, WebRequest request, ICredentials credentials)
at System.Net.AuthenticationManagerDefault.Authenticate(String challenge, WebRequest request, ICredentials credentials)
at System.Net.AuthenticationState.AttemptAuthenticate(HttpWebRequest httpWebRequest, ICredentials authInfo)
at System.Net.HttpWebRequest.CheckResubmitForAuth()
at System.Net.HttpWebRequest.CheckResubmit(Exception& e, Boolean& disableUpload)
at System.Net.HttpWebRequest.DoSubmitRequestProcessing(Exception& exception)
at System.Net.HttpWebRequest.ProcessResponse()
at System.Net.HttpWebRequest.SetResponse(CoreResponseData coreResponseData) -
-- End of inner exception stack trace ---
at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult]
at Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.End(IAsyncResult result)
at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T] -
-- End of inner exception stack trace ---
at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T]
at Microsoft.Workflow.Client.WorkflowManager.StartInternal(String workflowName, WorkflowStartParameters startParameters)
at Microsoft.SharePoint.WorkflowServices.FabricWorkflowManagementClient.StartInstance(String serviceGroupName, String workflowName, String monitoringParam, String activationKey, IDictionary`2 payload)
at Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider.StartWorkflow(WorkflowSubscription subscription, IDictionary`2 payload) StackTrace:
at Microsoft.Office.Server.Native.dll: (sig=3b031e72-1bc1-4f05-892b-9272cc1599bd|2|microsoft.office.server.native.pdb, offset=135DA)
at Microsoft.Office.Server.Native.dll: (offset=21F8D)
ULS log is attached Error Workflow.pdf