Power Platform – Executing Azure SQL stored procedure from Power Automate – Part 1 – Adding SQL Server Connector

Power Automate - SQL Server connector
Power Automate - SQL Server connector

Hi All,

Greetings for the day 🙂 LIFE IS BEAUTIFUL 🙂 I hope we all are safe 🙂 STAY SAFE, STAY HEALTHY 🙂

Today new learning 🙂

Background / Use Case / User Story :

  • In one of my application I need to update the database table in Azure SQL.
  • But table need to update based on certain condition.
  • We are automating Azure guest user management.
  • Condition is if guest user is successfully added to group then update our custom database.
  • We have Power Automate, calling Microsoft Graph Rest API to add guest user to group.
  • So we have written stored procedure in Azure SQL and calling from Power Automate based on success of Microsoft Graph Rest API.

Take away from this article:

  • Connecting to Azure SQL through Power Automate using “SQL Server” connector

Connecting to Azure SQL through Power Automate:

Microsoft Azure - Azure SQL db
Microsoft Azure – Azure SQL db
  • I am using SQL server management studio (SSMS) since which is very easy to use 🙂
  • Connecting our Azure SQL using SSMS
Microsoft Azure - Azure SQL db - connecting through SQL Server Management Studio (SSMS)
Fig: Microsoft Azure – Azure SQL db – connecting through SQL Server Management Studio (SSMS)
  • Now once we have DB ready we are ready to connect it through Power Automate
  • For connecting SQL Server from Power Automate we have Power Automate connector “SQL Server” available
  • From Power Automate home page, navigate to “Connectors” from left side pane and search for SQL server connector as
Power Automate - SQL Server connector
Fig: Power Automate – SQL Server connector
  • Please note that SQL Server connector is available for PREMIUM license
  • There are various triggers and actions available for SQL Server as
Power Automate - SQL Server connector
Fig: Power Automate – SQL Server connector
  • We will create new connection to SQL server
  • To create new connection, from left side pane navigate to Data >> Connections as
Power Automate - SQL Server connector - Adding new connection to SQL Server
Fig: Power Automate – SQL Server connector – Adding new connection to SQL Server
  • Click “+” sign as shown in above fig to add new connection
  • Pop up will appear for selecting the Authentication Type as
Power Automate - SQL Server connector - Adding new connection to SQL Server - Selecting "SQL Server Authentication" Authentication Type
Fig: Power Automate – SQL Server connector – Adding new connection to SQL Server – Selecting “SQL Server Authentication” Authentication Type
  • Here we will select “SQL Server Authentication” as Authentication Type.
  • For “SQL Server Authentication” as Authentication Type we need to specify following details as
    • SQL server name
    • SQL database name
    • Username
    • Password
Power Automate - SQL Server connector - Adding new connection to SQL Server - Selecting "SQL Server Authentication" Authentication Type
Fig: Power Automate – SQL Server connector – Adding new connection to SQL Server – Selecting “SQL Server Authentication” Authentication Type – Providing required details
  • We will get all the details from Azure Portal => from connection string as
Fig: Microsoft Azure - Azure SQL Server connection string
Fig: Microsoft Azure – Azure SQL Server connection string
  • Once we provided all the required details, next dialog will appear showing the progress for “Adding connection...” as
Power Automate - SQL Server connector - Adding new connection to SQL Server
Fig: Power Automate – SQL Server connector – Adding new connection to SQL Server
  • On successful addition of SQL Server connection, it will be listed under connection listings as
Power Automate - SQL Server connector - Added successfully
Fig: Power Automate – SQL Server connector – Added successfully
  • We could Edit / Share the respective connection as shown in above fig
  • Lets see the details for our newly added SQL Server connection as
Power Automate - SQL Server connector details
Fig: Power Automate – SQL Server connector details

In this way we could add connector to SQL Server through Power Automate. We are ready to use SQL Server triggers / actions.

Next Article : In next article we will discuss how to execute the stored procedure from Power Automate

Reference:

To understand Power Platform in depth please have a look our articles once –

Thanks for reading 🙂 If its worth at least reading once, kindly please like and share 🙂 SHARING IS CARING 🙂

Share In Teams:

Enjoy the beautiful life 🙂 Have a FUN 🙂 HAVE A SAFE LIFE 🙂 TAKE CARE 🙂

Prasham Sabadra

LIFE IS VERY BEAUTIFUL. ENJOY THE WHOLE JOURNEY :) Founder of Microsoft 365 Junction, Speaker, Author, Learner, Developer, Passionate Techie. Certified Professional Workshop Facilitator / Public Speaker. Believe in knowledge sharing. Around 20+ years of total IT experience and 17+ years of experience in SharePoint and Microsoft 365 services Please feel free me to contact for any SharePoint / Microsoft 365 queries. I am also very much interested in behavioral (life changing) sessions like motivational speeches, Success, Goal Setting, About Life, How to live Life etc. My book - Microsoft 365 Power Shell hand book for Administrators and Beginners and 100 Power Shell Interview Questions - https://www.amazon.in/Microsoft-Administrators-Beginners-Interview-Questions/dp/9394901639/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=1679029081&sr=8-11

You may also like...

1 Response

  1. March 3, 2021

    […] Azure SQL stored procedure from Power Automate. This is second part. In first part – “Power Platform – Executing Azure SQL stored procedure from Power Automate – Part 1 – Adding SQ… ” we discussed how to use “SQL Server” connector in Power […]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Microsoft 365

Subscribe now to keep reading and get access to the full archive.

Continue reading