在 Azure 逻辑应用程序中使用 HTTP 操作时,如何在 JSON 正文中使用“@odata.id”?
How to use "@odata.id" in JSON body when using the HTTP action in Azure Logic Apps?
我正在使用 Azure 逻辑应用通过 HTTP - HTTP
操作调出 Microsoft Graph API。为此 API 我需要使用以下正文执行 POST 请求:
{
"@odata.id": "<guid>"
}
当我尝试保存 Logic App 时,此错误显示:
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 负载中使用此属性?
编辑:根据要求,在保存时生成错误的逻辑应用程序部分的屏幕截图。
来自这篇文章:
Logic Apps workflow definitions with the Workflow Definition Language schema
If you have a literal string that starts with the @ character, prefix the @ character with another @ character as an escape character: @@
所以在你的情况下,这应该有效:
{
"@@odata.id": "your value here"
}
我正在使用 Azure 逻辑应用通过 HTTP - HTTP
操作调出 Microsoft Graph API。为此 API 我需要使用以下正文执行 POST 请求:
{
"@odata.id": "<guid>"
}
当我尝试保存 Logic App 时,此错误显示:
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 负载中使用此属性?
编辑:根据要求,在保存时生成错误的逻辑应用程序部分的屏幕截图。
来自这篇文章:
Logic Apps workflow definitions with the Workflow Definition Language schema
If you have a literal string that starts with the @ character, prefix the @ character with another @ character as an escape character: @@
所以在你的情况下,这应该有效:
{
"@@odata.id": "your value here"
}