Orchestrator API & PowerAutomate & Azure App Proxy - Help with 'You are not authenticated!'

Hello,

I’m trying to use PowerAutomate to add a queue item to UiPath Orchestrator (On-Premise). We have setup an ‘Azure App Proxy’ to act as the intermediary between PowerAutomate and Orchestrator. Using this setup I’m able to authenticate (receive a bearer token), as seen here (PowerAutomate → Azure App Proxy URL → On-Prem Orchestrator):

Using the same ‘Bearer’ token I’m retrieving in the first request, I then parse the response to retrieve only the token…
Skip Parsing Tested: I’ve copy/pasted this elsewhere and confirmed that the parsing is working as intended… I’ve also tested bypassing parsing entirely, by manually copy/pasting the token in the header (Authorization & Bearer longbearertoken)… still same result.
Access Test: Also, to rule out access issues (with either the bearer token, or the local tenant account I’m using that has required access), I’ve tested the same bearer token I’m receiving (from PowerAutomate) in Postman, and I’m able to accomplish retrieving queue definitions, adding a queue item, etc…

Bearer token parsing / assignment:

Side by side:

Error (PowerAutomate):

I can’t seem to figure out why the second request is failing, or what to do to get ahead of this authorization/access issue in PowerAutomate… when it seems to be working elsewhere (Postman).

Thank you kindly,

Hello @Alex76!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff

We got the above to work… IF we turn off authentication to the Azure App Proxy… which is obviously less than ideal. The ‘Active Directory OAuth’ overrides the authorization header supplied that’s intended for UiPath. This was found out through intercepting the API call in the cloud.

My current question is, given the above, does anyone have instructions on how to setup a a Microsoft PowerAutomate flow (either a ‘custom connector’ or configure the basic HTTP connector) to communicate with our on-premise UiPath Orchestrator through an Azure App Proxy (that also enforces authentication via ‘Active Directory OAuth’)?

I’m thinking I somehow need to either hit a different endpoint (a Microsoft one) PRIOR to sending the authentication request to UiPath (on-prem)… then maybe use a cookie or something (to authenticate with the proxy) instead of the current method… so the bearer token created and intended for UiPath gets send correctly.

1 Like