0

Here is the steps to connect to a SQL Server or Azure SQL database from Azure Logic apps using the Azure portal.

https://learn.microsoft.com/en-us/azure/connectors/connectors-create-api-sqlazure

But, I have to create SQL Server Connector's API Connection using the DotNet SDK.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

Currently, I can't find the creating logicApp connector API connection function from Azure SDK document.

If use the Rest API is possible, we could use the following rest API to do that.

put https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourcegroup}/providers/Microsoft.Web/connections/sql?api-version=2016-06-01

I also test it on my side with postman with following body.

{"properties":{"api":{"id":"/subscriptions/{subscriptionid}/providers/Microsoft.Web/locations/eastus/managedApis/sql"},"parameterValues":{"server":"{yourserverName}.database.windows.net","database":"{databaseName}","username":"{username}","password":"{password}"},"displayName":"{name}"},"location":"{location}"}

enter image description here

How to get the authorization token, please refer to another SO thread.

Tom Sun - MSFT
  • 24,161
  • 3
  • 30
  • 47