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?

Report
All responses (
Answers (