0

I am doing on POC for getting records from On-Premise SQL By using Logic Apps + API Apps.

I have created SQL Connector in API Apps and also created Logic Apps. But when try to add the SQL Connector API App in Logic App Designer. it is saying

Failed to fetch swagger. Ensure you have CORS enabled on the endpoint and are calling an HTTPS endpoint.

I browsed and found out for setting the Permission Level.

  1. Appsettings - > Set API Definition & CORS enabled.

  2. Authentication/Authorization - > On -> Allow Request (noAction)

  3. Restarted the API Service.

but still getting the same error.

I have browsed the URL "http://ftpconnector.azurewebsites.net/" . it is saying Permission

"Permissions for service \"FTPConnector\" are set to internal"

How can I Change the permission Level. I think if I change only I am able to add the connector in Logic App designer.

Please Assist

Thanks,

Vinoth

1
  • just curious to understand, are you using the latest v2 version of logic app which has the sql connector in it and you are getting an error there? Commented Jun 9, 2016 at 17:09

2 Answers 2

2

Related issue.

I was accessing Function app, via Logic app, when I got the above error.

Following worked for me:

  1. Function app > Platform features tab > API > CORS > Allowed Origins > (remove all, Save)

  2. Function app > Platform features tab > API > CORS > Allowed Origins > * > Save (that is add * and save)

  3. Function app > Overview tab > Restart

  4. Now the Logic app worked fine.

Hope that helps.

Sign up to request clarification or add additional context in comments.

3 Comments

There is a way to solve this without allowing "*" (all) origins. Open the inspector window of your browser - e.g. <f12> for Chrome - and look at the console for CORS related errors. In my case, the CORS error was reported for "ema.hosting.portal.azure.net". I added this to the list of CORS domains, restarted the Function App and refreshed the Azure Logic Apps editor - the OpenApi specification was then recognised by the online Azure Logic Apps editor and in Visual Studio.
I misspoke - it works in the online editor but not the portal. In short, the CORS error is browser related - you are on a "site" - such as the Azure Portal - that is trying to access a resource from another server that enforces CORS. So the trick is to see which domain the browser is reporting the error for and whitelist that. If I figure out how to debug the Logic App Designer in Visual Studio I'll post the solution.
Do you mean you don't have a better solution for now? If so, an Upvote for mine will help others? :-)
1

In the application settings you should change the access level to "public (authenticated)". currently Only other API apps or web apps in the same resource group are allowed to call the API app. In such a case the level will be internal.

"Permissions for service are set to internal but this request was external" for app in same resource group

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.