Calling HTTP with Azure AD with Asynchronous Pattern enabled fails with 401 when Location is returned
See original GitHub issueI have a following scenario:
Logic App calls Azure Resource Manager API PATCH operation which results with HTTP 202 and Location header returned. When I have asynchronous pattern enabled, the first request (PATCH) succeeds and returns Location header (pointing to ARM API) and Retry-After (10) which fails with 401 error:
{
"error": {
"code": "AuthenticationFailed",
"message": "Authentication failed. The 'Authorization' header is missing."
}
}
The issue is that when the connector follows the Location it omits the Authorization header and the overall operation fails. The workaround (from case 2209090010001308) is to disable Asynchronous Pattern and follow the requests manually via Until loop, which adds to complexity of the Logic App.
Is this desired behavior (I suppose it should be documented then) or is it a bug? I would classify it as a bug since when I have AAD protected API, I expect to protect all endpoints with it, even the endpoint from Location header.
AB#15942596
Issue Analytics
- State:
- Created a year ago
- Comments:9
Top GitHub Comments
This is a bug in the ARM connector that we will be fixing. Rough ETA is end of March. Hopefully, you can workaround this using the HTTP action until we have the fix in place.
The full run is: https://preview.portal.azure.com/#view/Microsoft_Azure_EMA/LogicAppsMonitorBlade/runid/%2Fsubscriptions%2F63dd3a98-6ad8-47ae-ae7f-568e9b3104a8%2FresourceGroups%2Fhajekj-frontdoortest%2Fproviders%2FMicrosoft.Logic%2Fworkflows%2Fgithub-logicapps-issues-611%2Fruns%2F08585262011232141435512064818CU138