2

I'm having trouble connecting to my SQL Server in an Azure Logic App.

I've just created a fresh SQL Server and database and am now attempting to connect to it in my logic app. However, it doesn't appear to be showing when I enter my credentials. I've been following this tutorial.

enter image description here

Does anyone know why this might be the case? Is it perhaps a permission thing that I may have missed?

I've also found that if i do an AD connection, I get this: enter image description here

Greg
  • 476
  • 9
  • 23
  • Is the name of the SQL Server correct, but just anonymized? Because otherwise it should be _your_ SQL Server name – rickvdbosch Jan 22 '21 at 15:38
  • Yeah i copied it straight across - I changed it to be uploaded on here. I think it might be permissions but its a shame as i was just following the tutorial – Greg Jan 22 '21 at 15:41

2 Answers2

1

Make sure you are allowing azure services to access your database server at

SQL Server > Firewalls and virtual networks > Allow Azure services and resources to access this server = Yes

enter image description here

Sadiq Khoja
  • 522
  • 1
  • 5
  • 23
  • Thanks, I've done that but hasn't made a difference – Greg Jan 22 '21 at 16:03
  • I think your credentials and/or sql server name are incorrect. I would try to connect to database from SSMS after adding my IP address in sql server firewall setting. – Sadiq Khoja Jan 22 '21 at 16:18
  • Okay, I'm not sure I've entered the details wrong - servername is copied from overview and should be like bananassqlserver.database.windows.net and I've checked my username and password and am able to login into the database and create tables. – Greg Jan 22 '21 at 16:40
  • And for the database, does this need to be everything or just the name without the brackets? – Greg Jan 22 '21 at 16:42
  • yes server name is like xyz.database.windows.net and database name is without brackets – Sadiq Khoja Jan 22 '21 at 16:56
1

Try this for connecting to your DB:

  • first of all, try to connect with Azure AD Integrated here, and if you don't see your SQL Server and DB in the list try the next step
  • go to Resource Group where you created LogicApp and find the connection name that you used when trying to connect with Azure AD Integrated. You need to open it and click on Edit API Connection. In Authentication Type use SQL Server Authentication and other data to connect to your DB here.
imansdn
  • 968
  • 1
  • 7
  • 17
Egor
  • 176
  • 1
  • 6