1

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

2
+50

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.

  • Could you give me more information about what information has to be in the header? – AdelPoint Dec 11 '14 at 10:54
  • Sure, but I think the response will error for normal application pages, as they wont respect the request but: Key Accepts with Value "application\json;odata=verbose" and key Content-Type with the same value. – Choggo Dec 11 '14 at 11:03
  • And if you use Authorization = "" it'll authenticate with the account that runs the workflow service, but that only works on premise... – Choggo Dec 11 '14 at 11:07
  • When you configure the RequestHeader dictionary you have a Key Value combination. The Key is Accepts and the Value is "application\json;odata=verbose" – Choggo Dec 12 '14 at 18:26
  • Hi, thank you. I got it working with a WCF service as described in the link you provided – AdelPoint Dec 15 '14 at 12:25
1

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.

  • hi, i already tried an app step. it was the same result... The WF calls the page with the Account which runs the WF service. This user has permission to view the page in browser. – AdelPoint Dec 12 '14 at 18:15
  • What I am suggesting is, Dont Change the worklfow, but instead publish it with farm admin's account. – Devang Zala Dec 15 '14 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.