Logic Apps Custom Connector - Error While Trying to Parse Open API Contract

Trey Pogue 20 Reputation points
2023-11-13T16:45:57.2366667+00:00

I'm just trying to create a custom connector in Logic Apps. I can create the basics of the connector, but when I try to upload my Open API file I get the error:

"An error happened while trying to parse the Open API contract. Please try again with a valid Open API contract."

I know it is valid JSON I've tested it on multiple validation sites.

If I go into the debugger in Edge (F12) I see a lot of 404 errors:

"GET https://api.powerapps.com/api/invoke 404 (Not Found)"

I've found I get this error before I even try to upload my JSON so I'm thinking this error is preventing me from creating the connector and it's not an issue with the JSON itself.

Any ideas?

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

Accepted answer
  1. Jamesoleg2 150 Reputation points
    2023-11-14T16:36:11.67+00:00

    Hey,

    The 404 error you're seeing ("GET https://api.powerapps.com/api/invoke 404 (Not Found)") seems unrelated to your JSON file. It might be causing the parsing issue.

    Here's a quick fix to try:

    1. Clear browser cache and cookies.
    2. Retry uploading your Open API file.

    If the issue persists, it might be a service problem on Microsoft's end. Contact Microsoft Support or check their service status page for updates.

    Hope this helps!


2 additional answers

Sort by: Most helpful
  1. Trey Pogue 20 Reputation points
    2023-11-14T16:31:37.4333333+00:00

    Turns out the errors found in debugger mode were not the issue.

    Finally stumbled across a blog comment how Logic Apps only supports Open API 2.0 and my file was 3.0

    Changed my file to Open API 2.0 and it worked

    Would be nice if @Microsoft documented this more prominently and included this in the error message!

    0 comments No comments

  2. MayankBargali-MSFT 70,936 Reputation points Moderator
    2023-11-16T11:13:14.71+00:00

    @Trey Pogue Thanks for sharing the resolution for the community member. The same is documented in the Prerequisites here.

    An OpenAPI definition that describes the example API. When creating a custom connector, the OpenAPI definition must be less than 1 MB. The OpenAPI definition needs to be in OpenAPI 2.0 (formerly known as Swagger) format.


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.