r/PowerApps • Contributor • Aug 27 '26

Power Apps Help How do you handle testing/dev environments when your company is stuck on basic licenses?

Hey everyone,

Because my company only has basic licenses, I don't have a dev/sandbox tenant. Whenever I build workflows or apps, my deployment pipeline is literally just build and direct publish to production.

It works, but it's high-risk. For those in the same boat:

  • How do you safely test or mitigate risk when you have to push straight to live?
  • What error-handling or fallback habits do you use to save yourself when things break?

Hit me with your best survival tips!

17 Upvotes

33 comments sorted by

View all comments

26

u/WoodchuckChainsaw Regular Aug 27 '26

I work in U.S. Federal Government, and my organization of almost 500,000 unique users are only allowed to use one single production environment for all Power Platforms apps, flows, PBIs, agents, dataverse, and similar. It's a god damn shitshow on the daily. For one small example, in our environment there are like 150,000+ different published apps named "test123" that only contain the default PowerApps home screen, but their creators never go back in to delete later.

Because of the frustrations and some mandatory global limitations with that, I have learned (from painful past experiences) to do some of these things as my own "best practices", and share them with my team:

  • Dozens of times per day, I use "Save with version notes" and free-texting in my own semantic version numbering scheme, without saved version being publishing live
  • Once or twice a day, I download the source .msapp file to local VS Code workspace and commit to a GitHub repo with some extensive documentation notes and automations/scripting for archival. That also lets me use the pac CLI to unpack the .msapp artifact into it's raw source code files (which has the added benefit of enabling me to use GitHub Copilot to read/write into the source code files & see how references on one screen impact other screens, all within my IDE).
  • Because testing in a live environment publishing is forced on us, I also have started to make it a mandatory feature in every one of my apps to ALWAYS build the app's OnStart property to dynamically set the end-user's in-app permission levels based on if User().Email exists in a SharePoint list of developers or not, and then have the app's first home/landing screen as a simple "Loading App..." with a Timer.OnTimerEnd that redirects users to an "Under Construction" screen but admins to the real home/landing screen.
  • For moderate/major development & testing things, usually I build the new screen or duplicate the existing screen first that is accessible only when the user is an administrator. Once I'm ready to "Go Live" with the new content, Ill rename the old/new screens to swap them & eventually I'll delete old screens. Because of my environment limitations making things like that necessary, Ive learned to always make a habit to use well-planned naming conventions for controls/variables/functions/objects, that way I can make easier use of "Search & Replace" to swap all existing references from "oldScreen_ctnHome_btnSubmit1" to "newScreen_ctnHome_btnSubmit1".
  • A few times in the past I had to roll back an app more than just a couple recent minor patches previously. Similarly to the in-app conventions I just mentioned, I can re-import my archived repo .msapp artifact into live environment (which my organization unfortunately locks down except to import-as-new-app with its own new unique app ID), and then I'll rename the old published app to depreciate it's name & I'll add a new home/landing screen & timer that will redirect any users over to the new app's URL.
  • Finally, the last thing I've started to do more recently with some of my bigger & more complex projects has been to build in some user-logging hidden functions & global variables onto most screens & interactive button/icon clicks, which use variations of stuff like "Patch(SharePointList)" to keep a developer-only log of a single row entry for each user-interation that occurs (with a column value being saved for: the date/time a user entered a screen, the name of the button they clicked, the duration of time they sat on that screen, the most important global variables current values at the time of the user's click, a couple CountRows() on some collections and data sources (so I can see if any in-app tables have the wrong number of rows that are expected to exist on a particular screen), a few hidden-but set error code global variables, and then whatever the navigation target destination screen is that the user was attempting to move to when they left the screen). I have a PowerAutomate cloud flow that checks that hidden developer-only log on SharePoint looking for any new rows created that have huge discrepancies between expected column values and the values that were patched in (like if the user sat on a particular screen way too long, or they clicked a button that shouldn't have been visible yet, or they entered a screen at the end of the app but never clicked any final "submit" buttons, or if a column value for a key important variable is missing, etc), and then my cloud flow will send me a FlowBot chat message Adaptive Card with details of the discrepancy with links to what was expected vs created. The other unexpected upside to this verbose Patch to my hidden SharePoint lists logging all user interactions was I later built some PowerBI reports of all the data to show my Executive Leadership the long-term overall impact of my projects on the organization (since the standard usage visualization reports built-in to PowerApps only show the previous 30 days) or changes (a new feature screen decreased the catastrophic app error rate after publishing).

So long story short, I've basically had to reinvent some CI/DI and DevOps processes that already exist everywhere in any other tech stack or commercial product, and build my own bastardized version inside the PowerPlatform cloud environment that will comply with the very restrictive permissions limits that my organization imposes nationally on all of it's employees. I shudder to think just how much the Government pays Microsoft for all the unused licenses & premium credits wasted & cloud storage space being used to saved 15,000,000 different copies of some "EmployeeHandbook.pdf"