CodexBloom - Programming Q&A Platform

Azure Logic Apps - HTTP Connector scenarios with 401 Unauthorized on Custom API

👀 Views: 84 đŸ’Ŧ Answers: 1 📅 Created: 2025-08-20
azure logic-apps authentication api-integration json

I'm migrating some code and I'm migrating some code and I'm trying to debug I'm currently building an Azure Logic App that integrates with a custom API... The Logic App is configured to use the HTTP connector to send a POST request, but I'm working with a '401 Unauthorized' behavior during runtime. I've verified that the API requires a bearer token for authentication and that I'm passing the token correctly in the headers. Here's the relevant part of my Logic App's configuration: ```json { "method": "POST", "uri": "https://mycustomapi.com/api/resource", "headers": { "Authorization": "Bearer your_access_token", "Content-Type": "application/json" }, "body": { "key1": "value1", "key2": "value2" } } ``` I've ensured that the token is valid and hasn't expired by testing it directly with Postman, where the API responds correctly. Additionally, I double-checked the Logic App's settings and confirmed that the connector is authorized with the correct permissions. However, when the Logic App runs, I still get the 401 behavior with the response message: 'Access Denied'. I've also tried using a different HTTP action to see if the scenario is specific to the HTTP connector, but it yields the same unauthorized response. Is there something I'm missing in the configuration of the Logic App or the way I'm handling the authentication? Any guidance would be greatly appreciated! What are your experiences with this? This is part of a larger mobile app I'm building. Is there a better approach? Any ideas how to fix this? My development environment is Ubuntu 20.04.