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 / Deploying SQLServer-ba...
Power Apps
Unanswered

Deploying SQLServer-based canvas apps across environments: Entra ID authentication

(0) ShareShare
ReportReport
Posted on by 313
I would like to reference a 'PROD' Azure SQL database ("DBProd") in my Power Apps production environment and a separate (cloned) 'DEV' sql database ("DBDev") in my development environment. I'm using EntraID authentication when connecting to Azure SQL Database, mainly so that I can lock down my Azure SQL access in firewall rules to a very limited selection of IP addresses of development machines, plus Azure Services. (If I used SQL Authentication I would have to open it up to all IP addresses.)

This is fairly straightforward for flows. I create an Environment Variable for 'DatabaseName', give it a value of "DBDev" in my dev environment, and use this to specify the database in each action that references the SQL database (mainly Execute Stored Procedure calls). When I pipeline deploy to production I can change the variable to "DBProd".

But it's not so straightforward for referencing tables and views in the Power Apps themselves. Because the database name is not included in the connector when using Entra ID authentication, my first thought was to use an Environment Variable in a similar way to flows - so when selecting the tables/views to connect to in Power Apps Studio I would use something like @{environmentVariables('DBName')} in the Database Name field. But this doesn't work!

Is there any alternative way of transporting Entra ID-authenticated SQL connections across environments in Power Apps? Or do I have to accept remaking the connections in Production and breaking good ALM protocol?
I have the same question (0)
  • TJ-30011537-0 Profile Picture
    2 on at
    Did you find any solution for this? I am facing the same issue.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 476

#2
WarrenBelz Profile Picture

WarrenBelz 365 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 339

Last 30 days Overall leaderboard