CodexBloom - Programming Q&A Platform

Azure Logic Apps - HTTP Trigger scenarios with 401 Unauthorized scenarios Despite Valid Credentials

πŸ‘€ Views: 115 πŸ’¬ Answers: 1 πŸ“… Created: 2025-06-23
azure logic-apps http-trigger authentication json

I'm converting an old project and I'm working with Azure Logic Apps to create a workflow that triggers on an HTTP request... I've set up an HTTP trigger and configured it to connect to an external API that requires Basic Authentication. However, I'm working with a persistent `401 Unauthorized` behavior when the Logic App tries to call the API, even though I'm confident that the credentials are correct. I've double-checked the username and password, and they work perfectly when tested in Postman. Here’s the configuration I have for the HTTP action in the Logic App: ```json { "type": "Http", "inputs": { "method": "GET", "uri": "https://api.example.com/data", "headers": { "Authorization": "Basic {base64_encoded_credentials}" } } } ``` I've encoded the credentials correctly using Base64, but still, I receive the 401 behavior. Additionally, I tried adding the `Content-Type` header as `application/json`, but it didn't resolve the scenario. The Logic App runs under a standard Azure subscription, and I’ve also ensured that there are no IP restrictions on the API side that could block Azure services. What am I missing here? Is there anything specific I should check for in the Logic App settings or the external API configuration? Any insights or suggestions would be greatly appreciated! My development environment is Ubuntu 22.04. What am I doing wrong?