The recommended pattern is well documented for this. Here is how it works.
Include definitions, not values
Add your environment variable definitions to your solution but remove the current values before exporting. Microsoft's own docs say: include definitions in the managed solution, let values be provided in the target environment. If you export values into a managed solution, clients can't update them without an upgrade operation, which is painful.
To remove values before export: in your solution, select the environment variable, go to Current Value > ... > Remove from this solution. The definition stays, the value does not travel with the solution.
What happens at install for AppSource customers
When a client installs your solution and it contains environment variables without values, the import wizard automatically prompts them to fill in the values. This is the built-in mechanism for AppSource no custom code needed. Microsoft confirms this behavior: "If your solution contains environment variables, you'll be prompted to enter values" during import.
For AppSource specifically, your solution goes through the Package Deployer. To give clients a smooth experience:
1. Package your managed solution using Package Deployer (this is what AppSource requires anyway)
2. Set sensible default values on environment variable definitions where possible, so clients only need to fill in environment-specific things like URLs or connection strings
3. Add descriptions to each environment variable definition so clients know what to put in this text shows in the import wizard
Post-installation configuration
f a value needs to change after install, clients can update environment variable values from the Default Solution in Power Apps maker portal, or directly in Power Platform admin center.
Values are unmanaged records even for managed solutions, so they are always client-editable without needing a solution update from you.
One thing to avoid: don't set values in your managed solution unless they are truly static and never need to change per client. Once a value is in a managed solution, removing it requires the client to run an upgrade operation, not just an update.
Best regards,
Valantis
✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.
❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).
🏷️ For follow-ups @Valantis.
📝 https://valantisond365.com/