Domanda

I am trying to figure out how or if it is possible to call an application page from inside a SPD 2013 Workflow.

I tried a HttpRequest action and entered the Url of the application page. The page is located inside the layouts folder of the Server.

When I check the ULS Logs I can see that the page is called, but in the context of a user with no claims and who is not authenticated, so the Code behind the aspx Page is never executed.

I tried running the operation in an app step after giving the Workflow app full permissions -> same result. I then read somewhere to set the RequestHeader to Authorization= "", but I still can see the same entries in the ULS and the Page's code is never really executed.

Can somebody tell me if and how it is possible to call an Application Page of the SP On premise server which contains the list on which the Workflow operates on?

If what I am trying to do is not possible, do you have any ideas how to achieve what I want to do. I want server side code to be called from inside a Designer Workflow.

best regards Alex

È stato utile?

Soluzione

This question resembles this other one: Call HTTP Web Service: Unauthorized

Ideally, you should publish the code as a web service into SharePoint instead of an Application page (as that is pretty much the same thing without the proper infrastructure).

Also, make sure you set the Header Dictionary into the proper property. SharePoint Designer misleads you into setting the RequestBody instead of the RequestHeader. The header is hidden from the main SPD action and you need to right click the action and choose properties to set it.

Altri suggerimenti

Have you tried putting your workflow in Impersonation step.

Impersonation step- here workflow will run on its publishers account.

I am not sure of similarity between App step and impersonation step, in case they are same then change the user who publishes the workflow.

I had issues with impersonation step, when I was publishing it with site collection admin account.

And later on succeeded when tried with farm admin's account.

can you try the same.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top