Expose an API to external users (Outside of the organisation/subscription) - To access a table in synapse dedicated sql pool

Vivek Komarla Bhaskar 956 Reputation points
2022-11-24T10:41:17.67+00:00

Is there a way to create an API which will be used by external users who are outside of an organisation and not part of any organisations azure subscription. This API will need to access a table in synapse dedicated sql pool. Any thoughts, please advise?

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,378 questions
{count} votes

Accepted answer
  1. Sonny Gillissen 3,751 Reputation points Volunteer Moderator
    2022-11-28T06:14:09.533+00:00

    Sure Vivek!

    So to start off: an Azure Function App approach could also work. I usually aim to use low-code (Logic Apps) when possible and full-code (Function App) when needed. However, it depends on your needs and preferences.

    Note: check your scaling and pricing based on the needed performance and abilities.

    So, either way, you can:

    • Set up an Azure Function using the HTTP-trigger where you load the ‘System.Data.SqlClient’ NuGet package which you can use to connect to SQL, read the table and provide the query output as response
    • Create a Logic App where you use a Request-trigger and a ‘SQL Server’ action to read the table. Next you’ll provide the result in a response action.

    After you’ve connected either your Logic App or Function App you can use the following docs to import them into the API Management:

    Please note that the default security of the APIM is subscription key. You can also, based on your requirments, extend this to OAuth or OpenID for better security.

    Let me know if this was the level of detail you were looking for. If we need to touch on something more in depth, feel free to reach out.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Sonny Gillissen 3,751 Reputation points Volunteer Moderator
    2022-11-26T22:08:27.997+00:00

    As far as I can see no API's are available to read tables directly from SQL Synapse, however you can create a Logic App to provide this functionality using the SQL Server connector which you expose through the Azure API Management service. When necessary you can perform transformations in the either the Logic App or Azure API Management policy.

    You can set authentication based on requirements (and possibilities) for the receiving end in your Azure API Management policy to provide external access in the way that suits your use-case best.

    Please feel free to reach out if you want to further discuss on this topic!
    When this was helpful please accept this answer :-)


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.