0

I've added a trigger based on the tutorial here. When I save it and try to run the trigger it results in a failure. If I look at the OUTPUTS LINK in the history it has the following:

{
"statusCode": 400,
"headers": {
    "Pragma": "no-cache",
    "x-ms-ratelimit-remaining-subscription-writes": "1197",
    "x-ms-request-id": "87dc2cc6-0894-4d2c-955d-22d922673139",
    "x-ms-correlation-request-id": "87dc2cc6-0894-4d2c-955d-22d922673139",
    "x-ms-routing-request-id": "WESTUS:20171005T133404Z:87dc2cc6-0894-4d2c-955d-22d922673139",
    "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
    "Timing-Allow-Origin": "*",
    "Cache-Control": "no-cache",
    "Date": "Thu, 05 Oct 2017 13:34:04 GMT",
    "Location": "https://logic-apis-westus.azure-apim.net/apim/azureeventgrid/65eea0596ae646bea4bbea2060aa2faa/eventSubscription/unsubscribe?x-ms-api-version=2017-06-15-preview&resource=%2Fsubscriptions%2F9c09809e-3d3b-4987-84f4-3d26f4eec628%2FresourceGroups%2FDSDev%2Fproviders%2FMicrosoft.EventGrid%2FeventSubscriptions%2FLogicApp3692dffd-19cb-49d4-836d-a54ca4a6ca22",
    "Content-Length": "25",
    "Content-Type": "application/json",
    "Expires": "-1"
},
"body": "Model state is invalid."

}

I've literally only added the trigger, so not sure what could be invalid?

Thanks

Alex

ADringer
  • 2,614
  • 36
  • 63

1 Answers1

0

Is this the first time you save such Logic App? Because the trigger is a webhook trigger, every time you modify it, upon save, the engine will unsubscribe the old event and subscribe to the new. If the old event as specified in the Logic App is not valid (e.g. you entered a non-existed resource name), the unsubscribe will fail. But even so, should the new information is valid, the subscribe should still work. You can verify it by triggering the event and verify the Logic Apps is triggered.

Derek Li
  • 3,089
  • 2
  • 25
  • 38
  • I have same problem, first time i do a logic app yes, and it fails with "Model state is invalid" on creating the event subscription. Its not related to it cleaning up an old name – Poul K. Sørensen Sep 29 '19 at 07:41