web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate flow us...
Power Automate
Unanswered

Power Automate flow using Service Principal connection to Azure SQL which is triggered via PowerApps - requesting credentials

(0) ShareShare
ReportReport
Posted on by 10

I have a solution which includes a Power App, a Power Flow and a Connection Reference to Azure SQL using a Service Principal account.  This all runs successfully when I test it under my login.

 

BUT when I share the application within other users they are prompted to enter in the Service Principal login details (tenant Id, client secret etc). 

 

I have tried numerous things including making the other user a co-owner of the application and flow.  In addition, all of the documentation I can find on Service Principals shows examples for connecting to Dataverse or Azure SQL only through powershell.  I cannot seem to find anything with the exact same architecture I have.

 

Is it even possible to use a Service Principal connection to Azure SQL in a Power Automate Flow within a Power App without the user having to enter in further credentials? 

 

The error message the other user got was:

 

{

  "status": 400,

  "message": "Invalid connection settings\r\n     inner exception: Not a valid data source.\r\nclientRequestId: xxxxxx",

  "error": {

    "message": "Invalid connection settings\r\n     inner exception: Not a valid data source."

  },

  "source": "sql-xxxxx-001.p.azurewebsites.net"

}

 

Invalid connection settings
     inner exception: Not a valid data source.
clientRequestId: xxxxxx

Categories:
I have the same question (0)
  • ali.r Profile Picture
    9 on at

    Hi, did you find the answer to your question? I am trying to do the exact same thing but the documentation is very scant.

  • sandy_rasa Profile Picture
    10 on at

    Hi - this was resolved with the help of the Microsoft Power Platform Support team.  Here is the resolution notes:

     

    SUMMARY

     

    Issue:

    -- User cannot Refresh / Add / Edit flows to app. Before, the flows were connected to SQL Server. The flows have been edited to connect to Azure SQL, then when user tried to refresh the flow, the app popped out an error message. 

     

    Discussion:

    -- Since the app has been developed a while ago, some of the new features were not there and now need to be turned on / off. 

    -- User finds out that she needs to remove the flows, turn on Enable enhanced Microsoft SQL Server connector feature, then readd the flows back. 

     

    Hope this helps.

     

  • LauraLTG Profile Picture
    2 on at

    Hi @sandy_rasa  Can you explain how you managed to connect to Azure SQL DB using Service Principal? I’m trying to do the same thing but I’m getting errors (The gateway did not receive a response within the specified time period. It cannot fulfill the request to the remote server.) I’m using SQL Get Rows (V2) in Power Automate. Thanks for Help!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard