oauth 2.0 Token in Logic app

Anagh Bhatt 21 Reputation points
2023-01-10T17:18:29.88+00:00

Hi

I need to generate ouath token in logic app. However i am able to generate oauth2.o token with ;postman

But i am getting 401 and 400 error. But same creds works in postman. header = "Content-Type": "application/x-www-form-urlencoded" body=grant_type=client_credentials&client_id=test&client_secret=cWs0Y3Z4c01nRWR4U3JsbjRveld5SVc4ZzRNQW44bUhoOE9k444

url =https://ssa-test.azure.test123.com/oauth2/token How to solve this error

{ "error": "invalid_client", "error_description": "Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method)." }

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

Accepted answer
  1. MayankBargali-MSFT 70,801 Reputation points
    2023-01-16T03:52:17.8833333+00:00

    @Anagh Bhatt Thanks for reaching out. It looks like the secret token is empty or not passed as per the error that you have shared. Logic app HTTP connector does support Content with application/x-www-form-urlencoded type. I will suggest you to also verify the know issue incase if you are passing any of the unsupported header. Please make sure that you are passing the right credentials in the header. In case if you still observe the issue then please share the screenshot (working and non working) along with what value you are passing so I can assist you further.

    For your reference sharing this blog while calls the API using OAUTH token.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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