Hello
@PK-31101107-0 , To switch SQL connections from Dev to Prod after deploying a Power Apps solution, use connection references and environment variables. These allow you to dynamically map the correct SQL connection in each environment without modifying the app itself.
Answering your questions:
1. How should the SQL connection reference be managed during deployment?
Use connection references inside your solution. These act as placeholders that can be mapped to actual SQL connections in each environment. When deploying to Prod, you simply rebind the connection reference to the correct SQL connector in that environment.
2. Do we need to manually create a new SQL connection in the Prod environment and map it?
Yes, the SQL connection must exist in the Prod environment. You’ll need to manually create it once, then map the connection reference to it during solution import. After that, the app will use the Prod SQL connection automatically.
3. Is there a recommended best practice to automate or streamline this (especially with Azure DevOps)?
Yes. Use Power Platform Build Tools in Azure DevOps. These tools let you:
• Export the solution from Dev.
• Use a deployment settings file to define connection reference mappings and environment variable values.
• Import the solution into Prod with the correct SQL connection and configuration—fully automated.
References: