Greg the Incredulous
Greg the Incredulous

Reputation: 1836

Connecting Azure Logic App to SQL using Azure AD Account

I am trying to use an Azure AD Account as the credentials for an Azure SQL connection but hitting the following error when I try to configure the connection in the Azure Portal:

Please check your account info and/or permissions and try again. Details: Microsoft SQL: Cannot open server "mydomain.onmicrosoft.com" requested by the login. The login failed.

I am trying to connect using "[email protected]". I've checked that the Azure AD Admin account is correctly configured in my Azure SQL Server, and that the "myaccountname" account belongs to an AD Group that has been granted the db_owner role in the database. I am able to successfully connect to the database using SSMS and that account, but when I try to set up the SQL connector in a logic app to use that account I can't get past the error.

Is it possible to use an Azure AD account as a service account to access Azure SQL Server from a Logic App? I can't find any documentation to confirm if this is allowed or not. Note, if I use the sqladmin account then the Azure Logic App SQL connection works, but if I try with the Azure AD Admin account it doesn't.

I thought it could be a firewall issue but I don't think it's that because the "Allow access to Azure services" flag is set to true, and within the portal when trying to set up the connection I can select the Azure SQL Server, and I'm then able to see the database.

Upvotes: 1

Views: 1771

Answers (1)

Joey Cai
Joey Cai

Reputation: 20067

It seems that you choose Authentication type like Active Directory - Password to use Azure Ad Account in SSMS to login .

But the Sql connector in Azure Logic app could not achieve it. You could upvote this feedback to promote the realization of this function.

Upvotes: 2

Related Questions