Logic App: Auth with Bearer only working with literal token value

Anonymous
2021-03-01T16:15:02.57+00:00

I'm getting an access token via usual mechanic I'm handling response via Parse JSON When I use follow-up HTTP request and use a header of "Authorization": "Bearer <var from Parse JSON>", I get a 401 When I replace <var from Parse JSON> with the literal it works (pasted from Postman) Yes, I have a space after Bearer I am in a foreach at the time I am in the same scope If I parse into a variable, the token value is as expected When I used a var, it is a string var I've tried string(<var from Parse JSON>) in the header Unfortunately, the Sanitized in the run output is not my friend!! Any ideas folks? ![73007-image.png][1] ![73101-image.png][2] [1]: /api/attachments/73007-image.png?platform=QnA [2]: /api/attachments/73101-image.png?platform=QnA

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,951 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 69,931 Reputation points
    2021-03-03T04:52:39.497+00:00

    For others, if you are facing the same issue please test with the same access token generated along with the same headers from the logic app and test them in Postman/fiddler whether you observed the 401 error.

    The above test will help you to confirm if the issue is with the access token generation call or while calling the API that uses the access token header for authentication.

    You can also navigate to the run history of your logic app to get the access token value on a fresh test.

    0 comments No comments