Azure Logic Apps error While Adding API Apps

2019-03-03 10:39发布

问题:

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:

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



回答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.