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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SQL Service Principal ...
Power Apps
Unanswered

SQL Service Principal Connection Issue when Deploying to UAT

(0) ShareShare
ReportReport
Posted on by 93
Hi All,

I am having an issue with SQL Connections when I deploy from Dev to UAT.   I have set up connections in both Dev and Test environments using Authentication Type: Service Principal (Microsoft Entra ID Application) and the Data in Dev is showing as expected.

When I come to deploy the Exported Zip Package to the Test Environment I get the usual review and adjust all connections and at this point I switch the Connector to the UAT Connection that I previously set up.  I then go ahead import the Solution and open the Application.  The application contains 5 stored procedures and one of them pulls data on start, I am not seeing any data in the application.

I then open the application in Edit mode in the test environment (I should not really do this) and check the connections to troubleshoot.  Upon removing and reconnecting a Stored procedure I can see that the SQL Server Name and SQL Database Name are pointing to the Dev Server and Database.

Once I add the Server Name and Database for Test and publish the Application works in UAT but with an unmanaged layer.      The problem is I do not get the opportunity to update  the Test Sql Server Name and Database when I am deploying.

Can anyone help with this one is this a limitation of connecting with Service principals?

I have attached images for reference.

Thanks
Jamie

 
Updating Connecti...
Test Connection.jpg
Swtiching Connect...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

Categories:
I have the same question (0)
  • Kushal_M Profile Picture
    165 Super User 2026 Season 1 on at
    Hello 
     
    Use Environment Variables iInstead of directly binding SQL connections inside the app.
    Create Environment Variables for:
    • SQL Server
    • Database Name
    Then use those during data source creation. However, Canvas Apps still have limitations with dynamic SQL data source switching.
    This works better for:
    • Power Automate
    • Custom connectors
    • Dataverse references
    than native SQL stored procedures.
     
    🏷️ Please tag me @Kushal_M, if you still have any queries related to the solution or issue persists.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
     Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 899

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 499

Last 30 days Overall leaderboard