Cannot connect to SQL Server from logic app

Taylor, Greg 106 Reputation points
2021-01-22T17:16:40.393+00:00

I'm having some trouble connecting to my Azure SQL database. I've been following this tutorial but for some reason I cannot connect. I've triple checked my credentials and can successfully log in to my database and query it.

I've copied and pasted the sql server connection name across, as well as the database name and the error that I am getting is:

"Error code: 'Unauthorized', Message: 'Credentials are missing or not valid. inner exception: The credentials provided for the SQL source are invalid. "

I've also check the box in both the database and server firewall settings to 'Allow Azure services and resources to access this server' but am still not able to connect.

I've tried all both the sql server connection and the AD connection and both do not prompt me for my existing server and database.

What am I doing wrong and how can i connect in my Logic App.

Cheers all in advance for any help or advice :)

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

Accepted answer
  1. Taylor, Greg 106 Reputation points
    2021-01-26T09:26:07.64+00:00

    After much investigation, I'm still none the wiser to what caused this issue however I have now resolved it. I'm not sure if this is helpful for anyone but I spent many hours creating new connections to try and sort it out.

    Steps I took to fix this was:
    -Create a new sql server and database and make sure they're in the same resource group.
    -Rather than creating a 'Insert new row' element in azure, I instead created a 'Execute a SQL query V2'. I connected using a the sql server authentication and made sure I could query my database first so that I knew my details were correct. Once the connection was setup, I then was able to see my server, database and table from the drop downs without manually typing them in (this is key or else it will not work).
    -I then deleted this and created 'insert a new row' which I originally had using the connection that I had just created. Then select again the credentials from the drop down.

    I think in the end there might have been a caching issue where it just took some time for the fields to appear in the drop down.

    Feel free to also share if you've ever encountered anything like before and what steps you took to resolve it.

    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Srivathsan S 41 Reputation points
    2022-02-24T15:11:33.357+00:00

    177582-image.png

    getting this error SQL Server connection right

    0 comments No comments

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.