How do I resolve 'Invalid request' error on Logic App for http POST action?

Vivek Komarla Bhaskar 956 Reputation points
2023-03-06T11:52:42.5133333+00:00

I have a logic setup with an HTTP POST action to retrieve a token, I have implemented my logic app as follows, but whenever I execute it, I receive the error 'Invalid request'. On Postman, the same works, but not here. How can I fix this?Screenshot 2023-03-06 at 11.40.29 am

Screenshot 2023-03-06 at 11.43.32 am

Azure Logic Apps
Azure Logic Apps

An Azure service that automates the access and use of data across clouds without writing code.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    11 deleted comments

    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    3 deleted comments

    Comments have been turned off. Learn more

  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  5. Alistair Ross 7,556 Reputation points Microsoft Employee
    2023-03-06T13:04:38.0333333+00:00

    Hello @Vivek Komarla Bhaskar

    I am hoping I can answer this with some trouble shooting steps as you have obscured the URL, therefore I cannot look up what is required (if it is a Microsoft URL for example)

    The issue here most likely won't be with the logic app, but the service you are trying to get the token from.

    • Can you verify the post request works from another service, such as PowerShell or https://www.postman.com/
    • Have you got all the required properties in the body not too many? It does seem strange to be providing a client secret and password in the same request, typically it would be one or the other when requesting a token, from my understanding.
    • Is the headers correct? Are you sure the content type isn't meant to be application/x-www-form-urlencoded ?

    Kind Regards

    Alistair

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.