0
votes

I've created a Logic App, which is configured to authenticate using AD Outh according to this:

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-securing-a-logic-app

This Logic App it takes a lot of time to execute and to avoid timeout the response was configured with Asynchronous Pattern as mention in:

https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations

The authentication with Bearer Token works and the Logic App responses with a URL (in Location header) in which finally will be stored the response.

The problem is that I cant't access to this URL because I'm receiving the next error:

{
    "error": {
        "code": "DirectApiAuthorizationRequired",
        "message": "The request must be authenticated only by Shared Access scheme."
    }
}

The problem is that the URL returned in the Location header only contains SAS keys when I run the Logic App using SAS and I need use only OAuth for securiry reasons.

Now, if try to access to this URL using Bearer token the response is:

{
    "error": {
        "code": "InvalidUseOfOAuthToken",
        "message": "The requested operation is not supported, Use of open authentication token is only supported for workflow trigger request."
    }
}

Here an example of the URL:

https://prod-05.southcentralus.logic.azure.com/workflows/a98d6ba3becd449db74ac0527a64ec57/runs/08585941366423271731798768425CU04/operations/c4d9cb98-03b3-4c44-87c3-5752c2ed403c?api-version=2016-10-01

So, understanding that is not posible access to this URL using OAuth, How can I force the header location to include the SAS parameters by consuming the logic app using OAuth?

1

1 Answers

0
votes

Finally, solution proposed was to use the functionality "Create expiring callback URLs" for Async Logic Apps,

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-securing-a-logic-app#create-expiring-callback-urls

This consists of creating a temporary URL for each execution, these URL’s contain SAS parameter which will in cretain date . These URLs are created from a call to the ARM Rest API using a Bearer Token and specifying the date on which it will stop working. With this way there is no problem using SAS because are temporary.

https://docs.microsoft.com/en-us/rest/api/logic/workflowversions/listcallbackurl