Pass dynamic connection string to Execute SQL task in Logic app

Nuwan Wickramanayaka 81 Reputation points
2023-07-13T14:44:21.7233333+00:00

I am working on Logic app and it requires to execute SQL tasks against the given db connection. I can create the dynamic connection string and assign to a variable. My Question is how i set that variable as connection string to SQL task in logic app. Currently it works with API connections.

Thanks

Nuwan

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

Accepted answer
  1. MayankBargali-MSFT 70,841 Reputation points
    2023-07-18T12:09:31.1166667+00:00

    @Nuwan Wickramanayaka Thanks for reaching out.

    Unfortunately, you cannot set the connection dynamically to the SQL connector using the connection string.

    The workaround will be using the Azure AD Integrated Authentication type, if possible, as below and for every database you are using enable the Azure AD authentication for the user that you have configured in your connector.

    User's image

    Now you can pass the dynamic value for your server name, database name and other parameter. In my case I am using HTTP trigger to pass those values dynamically.

    User's image

    Feel free to get back to me if you have any queries or concerns.

    Please "Accept Answer" if the answer is helpful so that it can help others in the community.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.