简体   繁体   English

Azure 逻辑应用程序 — HTTP 操作 — POST 错误

[英]Azure Logic Apps — HTTP Action — POST Error

So I am trying to get an authorization token from MSFT.所以我试图从 MSFT 获取授权令牌。 I am using the HTTP Request object as an action.我正在使用 HTTP 请求 object 作为操作。 I set the method to POST, provide URI, set a Content_Type in the Header, and add a grant type to the body.我将方法设置为 POST,提供 URI,在 Header 中设置一个 Content_Type,并在正文中添加一个授权类型。 Screenshot of LogicApps HTTP Setup LogicApps HTTP 设置的屏幕截图

When I run my logic app I receive the following error:当我运行我的逻辑应用程序时,我收到以下错误:

"error": "invalid_request",
  "error_description": "AADSTS900144: The request body must contain the following parameter: 'grant_type'.\r\nTrace ID: ef137edb-87d4-43e2-88b7-d119b2c00500\r\nCorrelation ID: 4ea88c05-7f28-4e3f-bb31-052c3baac198\r\nTimestamp: 2020-05-22 17:33:21Z",
  "error_codes": [
    900144

So the error says I am missing 'grant_type' but I have it in the body.所以错误说我缺少“grant_type”,但我在正文中有它。

Can anyone point me in a direction to get this resolved?谁能指出我解决这个问题的方向?

The Body in this case is not a JSON object, it's a Form encode.在这种情况下,Body 不是 JSON object,而是表单编码。 Here's a screen shot where I do this same task:这是我执行相同任务的屏幕截图:

在此处输入图像描述

You'll need to pass the client_id and client_secret as well.您还需要传递 client_id 和 client_secret。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM