Hi,
We have a canvas app that uses SharePoint as the backend that has a dev, staging and production version across three environments. We have a single SharePoint site that each environment saves to and have been using a column to filter out data between each environments app/flows.
As part of an upgrade to our app we have created three separate SharePoint sites so each environment will connect to its own. All data sources in the app and all SharePoint connections in our flow point to environment variables. The intention being that when we make a change and push it through our environment's we only have to amend each environments, environment variables and everything is good to go.
In the future we plan to add several additional production versions of the app with their own SharePoint sites to cater to different teams.
Unfortunately we have been running into several issues, while I have most things worked out, I wouldn't mind some feedback on whether this is the correct approach and am just posting this for other users. We do not want to end up in a situation where each change we make to the app in dev requires extensive modifications per environment to get up and running.
One master variable to store that environments related SharePoint site. A variable per SharePoint list that uses the master variable for the site and points to the appropriate list under that site
Each data source is uses that master variable, then points to the related list environment variable.
Each SharePoint action uses the master variable, then the appropriate list environment variable, no SharePoint actions are directly pointed to SharePoint.
When exporting the solution from dev as a managed solution, we import it into staging or prod and that it prompts or allows us to update the environment variables. Once all environment variables point to the site related to that environment. The app and flows work without issue.
When importing we were not prompted, attempted removing the current value of each environment variable and re-importing with no luck. We could not amend the environment variables within the solution as it was managed.
Fix -
After amending the environment variables then playing the canvas app only some data sources were pointing to the staging SharePoint site, with others pointing to the dev one, despite them using an environment variable that was pointing to staging.
To further test, back in dev I removed all data sources, re-added them via the site environment variable and re-exported then app and imported into staging with the same result.
Fix - Once in staging remove all data sources from the app and re-add them via the master site environment variable.
Flow
One of our PowerApps triggered flows was erroring, the 1st action that connects to SharePoint using the site environment variable and list environment variable errored, in the error log it was pointing to the dev site and not staging which the environment variable has been set to.
Fix - Started randomly working after about an hour...
Hi, you can just install the solution in production as managed, after that get the default solution on production, find variables from your installed managed solution and from this place you will be able to change the value of variables.
any update on this? none of the suggestions work for me. Default values don't get carried over to the export even after setting the values manually with production environment variable values. I ended up just using Current values as production values for the export just to get the app to be usable in production, then going back to the development environment to revert back Current values to DEV environment variable values again.
@BenAu im asking the similar even while import im modified the env value it didnt seem to have upated or app is still pointing to dev site
The worst thing is that you have to edit the app on PROD to fix the connection issues and save the changed app. That put's an unmanaged layer on your solution.
I wish MS wouldn't only focu on profit and selling premium licenses but provide proper support for their own solution stack (e.g. SharePoint).
Exactly it sucks! I never know if after updating the app to PRO it will work properly saving the data in the right place!
And if I understand correctly, after such an operation, I have to go back to the solution on the DEV and from the soloution to update anew each Sharepoint storage variable, edit the application, remove the connections and add them anew in the reference to the environment variables? 😡
I have exactly the same issues. And yes, I remove the values from the variables before export. Sometimes I get prompted, sometimes I don't. I also noticed that removing and re-adding the variable from/to the app works. But seriously: That can't be the way!
In addition we face the issue that once we upgrade a solution the referring environment variables in the target environment are suddenly empty and must be set before removing and re-adding them to the app. This feature is rubbish.
I've been looking at this for the past few days and I've noticed that changing the value of the SharePoint environment variable in the recipient environment's Default solution doesn't work immediately, but does 'kick in' after around 60 to 70 minutes. In the testing I've done this was the case on every occasion and the apps and flows then worked as expected
I tried with just a current value ,just a default value and both current and default values and all eventually worked as they should. The delay isn't ideal, but waiting an hour or so when transitioning to a new environment is do-able
More testing tomorrow
Another latest update (also see Solved: Updating Environment Variables in Managed Solution - Power Platform Community (microsoft.com)😞 you ALSO need to remove the Default Value from the Environment Variables to get the prompt during the Solution Import. In my multiple tests of a FIRST solution import, this gave me the modern wizard prompt to update the variables right after the step to update the Connection References with Connections.
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473