Use Managed Identity to connect to Azure SQL Database from logic app

Our Cloud School
5 min readJul 28, 2023

This is part02 of MSI with Azure, In this blog I will share how to setup secret less connection with logic app and sql server to connect to the database

In the previous section we have learned about MSI with Azure, if you want to refer the same in case if missed it here is the blog link

Now in this blog we will discuss a practical example of logicapp connecting to azure sql database using managed identity (without connection string or credentials), to show this connectivity working we need following azure infrastructure as prerequisite:

  • Azure SQL Server Instance.
  • Azure SQL Server database with Activity Directory Authentication.
  • Logic App Standard with MSI configuration.

I have Azure SQL server configured for this blog

Only active directory authentication is enabled in this SQL server.

In this SQL Server I have provisioned a SQL DB named sqldb-product

Now I am going to create a sample table for our demo using the command below

PersonID int,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)

Using the command above I can create the table, in the table I have added a sample record which I can test it with the query below

Select * from [dbo].[Persons]



Our Cloud School

Rakesh Suryawanshi — Azure Solutions Architect, DevOps with Terraform