question

AmarAgnihotri-6676 avatar image
0 Votes"
AmarAgnihotri-6676 asked MayankBargali-MSFT commented

Not getting response while making a POST request in Logic app

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
image.png (8.7 KiB)
image.png (19.6 KiB)
image.png (19.0 KiB)
image.png (50.3 KiB)
image.png (42.4 KiB)
image.png (36.6 KiB)
image.png (36.3 KiB)
image.png (7.3 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AmarAgnihotri-6676 As per the above images it looks the response is the redirect URL (status code 3xx) which is not supported as documented here and the response is the page.

0 Votes 0 ·

0 Answers