6

我正在使用 Azure 逻辑应用程序通过操作调用 Microsoft Graph API HTTP - HTTP。对于此 API,我需要使用以下正文执行 POST 请求:

{
   "@odata.id": "<guid>"
}

当我尝试保存逻辑应用程序时,此错误显示:

Failed to save logic app <redacted>. The template validation failed: 'The template action '<redacted>' at line '1' and column '144589' is not valid: "Unable to parse template language expression 'odata.id': expected token 'LeftParenthesis' and actual 'Dot'.".'.

如何在我的 JSON 有效负载中使用此属性?

编辑:根据要求,在保存时生成错误的逻辑应用程序部分的屏幕截图。 属性中的点触发保存错误

4

1 回答 1

14

从这篇文章:

具有工作流定义语言架构的逻辑应用工作流定义

如果您有一个以 @ 字符开头的文字字符串,请在 @ 字符前加上另一个 @ 字符作为转义字符:@@

所以在你的情况下,这应该工作:

{
  "@@odata.id": "your value here"
}
于 2018-05-09T11:00:55.820 回答