Azure Logic App HTTP Trigger scenarios with 401 Unauthorized scenarios After Configuration Change
I can't seem to get I'm trying to implement I'm working with an scenario with my Azure Logic App that uses an HTTP trigger to call an external API. After modifying the API's authentication method from Basic Auth to OAuth 2.0, I'm now receiving a 401 Unauthorized behavior when the Logic App attempts to connect. The API requires a bearer token in the Authorization header, but Iโm not sure how to properly configure the Logic App to handle this. Previously, I was using the following action to make the HTTP request: ```json { "method": "GET", "uri": "https://api.example.com/data", "headers": { "Authorization": "Basic YWxhZGRpbjpvcGVuIHN0cmlwZQ==" } } ``` I updated it to include the bearer token, but Iโm unsure how to dynamically fetch and include it. I tried setting up an Azure Key Vault to store the client ID and secret for the OAuth 2.0 token, but now Iโm hitting a snag. Hereโs what I currently have: ```json { "method": "GET", "uri": "https://api.example.com/data", "headers": { "Authorization": "Bearer @{body('Get_OAuth_Token')['access_token']}" } } ``` The Logic App does include an action to fetch the OAuth token, but it seems like itโs not being retrieved correctly or is not valid. Iโve confirmed that the Logic App has permissions to access the Key Vault and to get the secret. However, I still see the behavior and the following logs indicate that the token is either missing or expired: `"behavior": { "code": "401", "message": "Unauthorized" }` Iโm using the Azure Logic Apps Standard version and have ensured that all necessary connections are set up. What steps should I take to resolve this scenario and successfully authenticate with the API using OAuth 2.0? Any guidance or code examples would be appreciated! For reference, this is a production mobile app. I'm open to any suggestions.