Not getting response while making a POST request in Logic app

Amar Agnihotri 926 Reputation points
2022-04-11T07:17:53.113+00:00

Hi,

I am trying to generate authorisation code by making a POST request in logic App. Let me clear each and every step of what i trying to achieve
Actually this is the URL -

191764-image.png

In this i passed my client id = 021ed4a0-7883-42fd-82c0-056648bb3567
redirecturi = http://localhost:44300/

as you can see in this snap
191657-image.png

Now when i hit enter the page redirect and i get a code generated in the URl as shown -

191658-image.png

Now i use this code as an authorisation code to generate access token while calling REST API.

Now when i tried to generate this authorization code using logic app in azure .

191659-image.png

As you can see i defined all the parameters in the body

191755-image.png

When i run this logic app
191773-image.png

The URI generated is
https://login.microsoftonline.com/common/oauth2/authorize?client_id=021ed4a0-7883-42fd-82c0-0566481cc851&response_type=code&redirect_uri=http://localhost:44300/&response_mode=query&scope=openid&state=12345

It runs successfully but it is not generating the code as described above when we are running the url directly in the browser.

In the body it is returning the HTML of page and somewhere i found these in the code -

See the highlighted ones

191708-image.png

191730-image.png

I have tried multiple times but not able to generate the auth code using logic app. Can anyone help me out how to get that. I don't know what mistake am i doing.

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

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.