Build an Overtime Timesheet App in Power Apps — Part 21: Install the App in a New Environment
Part 20 turned the app into two managed zips. This part installs them the way another organization would: in a brand-new environment, on a brand-new SharePoint site, with nothing carried over from development. At the end, a nurse logs overtime, her manager approves it in Outlook, and payroll gets the month's workbook.
This is Part 21 of a 22-part series.
- Part 1: Plan the App and Set Up the Demo Organization
- Part 2: Create the SharePoint Site and Lists
- Part 3: Keep Overtime Private with SharePoint Permissions
- Part 4: Create the Solution, Environment Variables and Canvas App
- Part 5: Build the Home Screen
- Part 6: Build the Log Overtime Screen
- Part 7: Build the My Overtime Screen
- Part 8: Build the Approval Flow for Teams and Outlook
- Part 9: Show Approvers What's Waiting
- Part 10: Build the Departments Screen
- Part 11: Build the Reports Screen
- Part 12: Import the Old Excel Timesheet
- Part 13: Create the Monthly Payroll Workbook with Office Scripts
- Part 14: Create the Payroll Workbook from the App
- Part 15: Build the Power BI Overtime Report
- Part 16: Share the App and Add It to Microsoft Teams
- Part 17: Manage Joiners, Movers and Leavers
- Part 18: Build a Setup Flow That Creates the Lists
- Part 19: Set SharePoint Permissions from the Setup Flow
- Part 20: Run the Solution Checker and Export the Solutions
- Part 21: Install the App in a New Environment (you are here)
- Part 22: Recap, Production Checklist and Next Steps (coming soon)
The two zips from Part 20 hold everything the app is made of. Overtime Timesheet Setup holds the flow that creates the lists, the library and their permissions on any site. Overtime Timesheet holds the canvas app, its seven flows, six connection references and five environment variables, without values. Installing them anywhere else takes the same steps every time: an environment, a site, the setup flow, the app, and a few things the zips can't carry, such as who may use the app and the IDs of the payroll script.
What You'll Have
| Piece | What it is |
|---|---|
| Overtime Timesheet Demo | A trial environment with Dataverse, in the UK region, open only to the Overtime Timesheet Users group |
| A group team | Gives that group the Basic User role there |
/sites/OvertimeTimesheetDemo | A new communication site in UK formats and London time, with the lists and library made by the setup flow |
| Overtime Timesheet Setup and Overtime Timesheet | Both solutions installed as managed, the app pointed at the new site |
| Overtime Timesheet Local Changes | An unmanaged solution holding this environment's one change: the payroll flow's script, picked from the new site |
| Sharing | The app shared with the users group, and the three flows the app runs shared with it as run-only |
| The first use | Two departments, an entry by Aisha, Daniel's approval in Outlook, and Leo's payroll workbook |
Cost. Nothing here. A trial environment is free for 30 days (About trial environments), and the people who used the app had only their Microsoft 365 licenses. A real installation belongs in a production environment, which needs 1 GB of Dataverse database capacity available in the tenant. This tenant has none, which is why the install runs in a trial.
Prerequisites
- Part 20 completed: the two managed zips in the
releasefolder. - A Power Apps plan or trial on the account that creates the environment. Microsoft's Who can create environments? says trial environments need one, admins included. The admin account here already had a Power Apps trial.
- The Power Platform CLI, only for the command-line install at the end.
Step 1: Create the Trial Environment
In the Power Platform admin center, select Manage → Environments → New (How to Create a Free Trial Environment in Power Platform). I chose Type Trial, Region United Kingdom, where the demo organization works, and named it Overtime Timesheet Demo:

Under Change default settings, I left Make this a Managed Environment at No and switched Add a Dataverse data store? to Yes, because solutions live in Dataverse. The button at the bottom became Next:

On Add Dataverse, the only English the Language list offered was English (United States). I chose GBP (£) for Currency and, under Security group, Overtime Timesheet Users, found by searching for Overtime. Only the group's members can then get into the environment:

Select Save. The list showed it as Trial (29 days remaining), Preparing, and about five minutes later as Ready. Its Details card has the type, the region and the group:

Step 2: Give the Group the Basic User Role
People need a security role in the environment to read the app's environment variables. A group team gives it to everyone in Overtime Timesheet Users at once (How to Assign a Dataverse Security Role to a Microsoft Entra Group). On the environment's page, select Access → Teams → See all → Create team.
Business unit and Administrator were empty and required, and Next stayed unavailable until both had a value. I chose the environment's root business unit and myself, then Team type Microsoft Entra ID Security Group, the group, and Membership type Members:

In Manage security roles, tick Basic User and select Save. A second dialog asks again, and the role is only saved after its own Save (Fixed: Security Role Not Assigned to a Team):

The page then said Security roles updated for team Overtime Timesheet Users successfully.
Step 3: Add the People to the Environment
A trial environment doesn't add the group's members by itself, and someone who isn't in it yet can't open the app (Fixed: "You Can't Open Apps in This Environment"). So I added the five people before anyone tried. Select Access → Users → See all → Add user (How to Add a User to a Power Platform Environment). The panel lists what a person needs: enabled, licensed, and in the environment's security group:

After Add, a message says the person still needs a role, and the Manage security roles panel opens by itself:

The group team already gives Basic User, so I closed that panel with Cancel. After Olivia, Daniel, Aisha, Maya and Leo, the list had seven people, including Microsoft's own Support User:

Step 4: Create the Site
The app needs a SharePoint site of its own. On the SharePoint start page, select Build → Site → Communication site → Blank → Use template (How to Create a SharePoint Communication Site):

A new site starts in US formats and Pacific time. As in Part 2, I set its Regional settings: Locale English (United Kingdom) first, which also switched the week to start on Monday and the time to 24-hour, then Time zone (UTC) Dublin, Edinburgh, Lisbon, London (How to Change the Date Format of a SharePoint Site, How to Change the Time Zone of a SharePoint Site).
The site needs nothing else by hand. The setup flow creates the lists and library and gives the users group its access.
Step 5: Import the Setup Solution
In Power Apps, switch to the new environment (How to Switch Environments in Power Apps). Its home page said Your trial environment will expire in 29 Days. Convert it to production to keep it.
Select Solutions → Import solution → Browse, choose OvertimeTimesheetSetup_1_0_0_0_managed.zip, and select Next (How to Import a Solution in Power Apps). Details shows what's coming in:

On Connections, the solution's one reference got a green check by itself: Power Apps created a SharePoint connection for me in the new environment:

Select Import. About a minute later: Solution "Overtime Timesheet Setup" imported successfully.
Step 6: Run the Setup Flow on the New Site
Open Overtime Timesheet Setup, then the flow Set Up Overtime Timesheet. It was already On. In its details, select Run (How to Run an Instant Cloud Flow in Power Automate). The flow asks for the four values from Parts 18 and 19:

| Input | Value |
|---|---|
| Site URL | https://contoso.sharepoint.com/sites/OvertimeTimesheetDemo |
| Payroll group ID | The Object ID of Overtime Payroll in Microsoft Entra |
| Admins group ID | The Object ID of Overtime Admins |
| Users group ID | The Object ID of Overtime Timesheet Users |
Each group's Object ID is on its Overview page in Microsoft Entra, with a button that copies it (How to Find a Group's Object ID in Microsoft Entra). Select Run flow, then Done. The run took a minute and a half:

The new site now has the Departments, OvertimeEntries and Settings lists and the Payroll Exports library, with Settings holding the two group IDs and Payroll Exports a Setup folder:

Step 7: Copy the Payroll Template and Script
The payroll workbook from Part 13 needs two files in Payroll Exports › Setup: the template Payroll Template.xlsx and the Office Script Fill Payroll Workbook.osts. They're files, not solution objects, so neither zip carries them. I downloaded both from the development site's Payroll Exports › Setup (How to Download Files from a SharePoint Document Library), opened the same folder on the new site, and uploaded them with Create or upload → Files upload (How to Upload Files to a Folder in a SharePoint Document Library):

Step 8: Import the App Solution
Import OvertimeTimesheet_1_0_0_0_managed.zip the same way. Details:

Connections listed seven, under the names Part 20 gave the references, and every one turned green by itself, with a new connection of mine for each connector:

Environment Variables asks for the site first, and then offers only that site's lists and libraries (How to Set Environment Variable Values When Importing a Solution). The site list showed every site I can open, the development site included, so pick the new one with care:

Select Import. A minute and a half later, both solutions were in the Managed list:

Inside Overtime Timesheet, the seven flows are On. Above them, Power Apps says what managed means:

Step 9: Pick the Payroll Script Again in a Local Solution
One thing in the app still points at the development site. Part 20 found that Fill the workbook, the Run script from SharePoint library action in Create Payroll Workbook, keeps the IDs of the development site's library and script. The flow is managed here, so it's changed from an unmanaged solution of this environment's own (How to Edit a Cloud Flow in a Managed Solution in Power Automate).
Create the local solution
Select Solutions → New solution and name it Overtime Timesheet Local Changes. The Publisher list offered only the environment's own publishers, not Dewiride, so I chose CDS Default Publisher. Under More options, a description says what it's for:

Add the payroll flow
In the new solution, select Add existing → Automation → Cloud flow, select Create Payroll Workbook on From Dataverse, and Add (How to Add an Existing Cloud Flow to a Solution in Power Apps):

Open it and change the action
Select ⋮ → Turn off, then ⋮ → Edit. The designer warns about the layer this edit will create:

Open Fill the workbook. Both locations already read the new site from the environment variable, but Workbook Library and Script Library show long IDs that start with b!: the development site's library, which this site doesn't have:

Clear Workbook Library with its X. Its drop-down now lists the new site's libraries. Choose Payroll Exports:

Do the same for Script Library. As soon as it changed, monthTitle and entries disappeared, and the folder icon in Script gave me Script not found. It may have been unshared or deleted. Script still held the development file's ID (Fixed: "Script not found. It may have been unshared or deleted." in Power Automate). Select the folder icon again, open Setup with >, and choose Fill Payroll Workbook.osts:

The two script parameters came back with the values Part 13 gave them:

Select Save. The title said Saved, and the yellow bar went away.
Turn it on and check the layer
Back in the local solution, select ⋮ → Turn on. The flow now says Managed Yes and Customized Yes. Its solution layers show this environment's change on top of the managed flow (How to See a Component's Solution Layers in Power Apps):

That layer is the one thing to remember when a new version of the app arrives. A later release that changes Create Payroll Workbook won't take effect while this layer is on top. Remove the layer before importing it, and pick the script again afterwards (How to Remove the Unmanaged Layer from a Managed Component in Power Apps).
The import flow. Import Old Overtime Timesheet's List the old rows also keeps IDs: those of the old workbook in my OneDrive. This environment is in the same tenant, so they still point at my file, and I left that flow as it is. An organization installing elsewhere picks its own old workbook there, the same way, in the same local solution.
Step 10: Share the App with the Group
In Apps, select ⋮ next to Overtime Timesheet → Share, and add Overtime Timesheet Users as User (How to Share a Canvas App with a Security Group in Power Apps):

After Share, the dialog reminds you that nobody is told:

Each person opened the app from its web link (How to Find the Web Link of a Canvas App in Power Apps).
Step 11: Give the Flows Their Run-Only Users
The app runs three flows itself, and, as in Part 16, people can only run them as run-only users (How to Share a Flow with Run-Only Users in Power Automate). Open each flow's details from the solution and select Edit on the Run-only user card:
| Flow | Run-only users |
|---|---|
| Get Waiting Approvals | Overtime Timesheet Users |
| Get Overtime Report | Overtime Timesheet Users |
| Create Payroll Workbook Now | Overtime Payroll |

Connections Used came through the import as Part 16 set them: each person signs in to Office 365 Users themselves, so the flow knows who's asking, and SharePoint and Office 365 Groups use my connection (How to Choose the Connections Run-Only Users Use in Power Automate).
The box for Create Payroll Workbook Now found Overtime Payroll, although this environment has no team for that group: the run-only box finds Microsoft Entra groups as well as teams.
Step 12: Open the App and Add the Departments
I opened the app first, as its admin (How to Open a Shared Canvas App for the First Time in Power Apps). It asked to use three connections:

After Allow, Home showed only Log overtime, My overtime and Departments. With no departments, nobody is an approver yet, and I'm not in the payroll group:

The Departments list is empty on a new site. With Part 10's screen I added the two departments the demo staff work in:


Step 13: Log, Approve and Pay
The install is only done when the app works for the people who use it, so I went through one entry from start to finish as three of them.
Aisha logs overtime
Aisha, a nurse in Radiology since Part 17, opened the link, allowed the same three connections, and logged two and a half hours for that morning:

Save said Your overtime was saved. It's waiting for approval., and Overtime Approval started within a minute.
Daniel approves in Outlook
Daniel, Radiology's approver, got the request by email a minute later:

He chose Approve, wrote Thanks for covering the CT list. and selected Submit (How to Approve a Request from an Outlook Email):

The flow run finished Succeeded, three minutes after it started, most of it waiting for Daniel. Daniel had only Basic User, through the group team, and that was enough.
Leo creates the payroll workbook
Leo, in payroll, opened the app and its Reports screen. November 2026 showed Aisha's 2.50 hours. He selected Create payroll workbook, and under a minute later Open the workbook appeared:

The workbook opened in Excel for the web with Approved overtime: November 2026 on its Entries sheet, Aisha's row approved by Daniel Brooks, and a total of 2.50 hours. The script picked in Step 9 ran on the new site.
Do It with the CLI
Both imports can run from the Power Platform CLI. It can't ask for connections or the site, so they go into a settings file. I ran the app's import this way after the portal import.
Sign in to the new environment
pac auth create --name OvertimeDemo --deviceCode --environment "Overtime Timesheet Demo"
To sign in, use a web browser to open the page https://login.microsoft.com/device and enter the code S3FU7HW9N to authenticate.
'admin@example.com' authenticated successfully.
Validating connection...
Connected to... Overtime Timesheet Demo
Default organization: Overtime Timesheet Demo
Authentication profile created
* UNIVERSAL OvertimeDemo : admin@example.com Public https://org00000000.crm11.dynamics.com/
That was my second try. The first stopped with a non-recoverable error after the sign-in had worked (Fixed: "No token cache item found of UNIVERSAL kind" When Signing In with pac auth create). The profile then listed the environment's solutions:
pac solution list
Connected as admin@example.com
Connected to... Overtime Timesheet Demo
Listing all Solutions from the current Dataverse organization...
Unique Name Friendly Name Version Managed
Cr4a46c Common Data Services Default Solution 1.0.0.0 False
Default Default Solution 1.0 False
OvertimeTimesheet Overtime Timesheet 1.0.0.0 True
OvertimeTimesheetLocalChanges Overtime Timesheet Local Changes 1.0.0.0 False
OvertimeTimesheetSetup Overtime Timesheet Setup 1.0.0.0 True
Create and fill the settings file
pac solution create-settings --solution-zip release/OvertimeTimesheet_1_0_0_0_managed.zip --settings-file OvertimeTimesheet.settings.json
Extracting Dataverse connection references and/or environment variables from: /Users/you/overtime-timesheet/release/OvertimeTimesheet_1_0_0_0_managed.zip
Deployment settings file created: /Users/you/overtime-timesheet/OvertimeTimesheet.settings.json
The file has an entry for each of the five environment variables and six connection references, each with an empty value. Here is part of it after filling it in:

{
"EnvironmentVariables": [
{
"SchemaName": "dewiride_OvertimeTimesheetSite",
"Value": "https://contoso.sharepoint.com/sites/OvertimeTimesheetDemo",
"Name": {
"Default": "Overtime Timesheet Site",
"ByLcid": {
"1033": "Overtime Timesheet Site"
}
},
"TypeId": 100000004,
"Description": {
"Default": "The SharePoint site that holds the Overtime Timesheet lists and library.",
"ByLcid": {
"1033": "The SharePoint site that holds the Overtime Timesheet lists and library."
}
},
"IsRequired": false,
"ParameterKey": "dataset",
"ApiId": "/providers/microsoft.powerapps/apis/shared_sharepointonline"
},
{
"SchemaName": "dewiride_OvertimeEntriesList",
"Value": "00000000-0000-0000-0000-000000000000",
"Name": {
"Default": "OvertimeEntries",
"ByLcid": {
"1033": "OvertimeEntries"
}
},
"TypeId": 100000004,
"Description": {
"Default": "The SharePoint list of overtime entries.",
"ByLcid": {
"1033": "The SharePoint list of overtime entries."
}
},
"IsRequired": false,
"ParameterKey": "table",
"ApiId": "/providers/microsoft.powerapps/apis/shared_sharepointonline",
"ParentSchemaName": "dewiride_OvertimeTimesheetSite"
}
],
"ConnectionReferences": [
{
"LogicalName": "dewiride_OvertimeTimesheetSharePoint",
"ConnectionId": "shared-sharepointonl-00000000-0000-0000-0000-000000000000",
"ConnectorId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline"
},
{
"LogicalName": "new_sharedoffice365users_8936f",
"ConnectionId": "shared-office365user-00000000-0000-0000-0000-000000000000",
"ConnectorId": "/providers/Microsoft.PowerApps/apis/shared_office365users"
}
],
"CopilotAgents": []
}
The full file has the other three list and library variables and four more references in the same shape. Only Value and ConnectionId change:
| Entries | Value |
|---|---|
The site variable, "ParameterKey": "dataset" | The new site's address |
The four list and library variables, "ParameterKey": "table" | Each list's or library's ID on the new site, read with SharePoint's REST API as in How to Set Environment Variable Values When Importing a Solution |
| The six connection references | The ID of my connection for each connector, from pac connection list (How to Set Connection References in a Deployment Settings File) |
Import with the file
pac solution import --path release/OvertimeTimesheet_1_0_0_0_managed.zip --settings-file OvertimeTimesheet.settings.json
Connected as admin@example.com
Connected to... Overtime Timesheet Demo
Solution Importing...
Solution Imported successfully.
It took 38 seconds. Because the same version was already installed, it updated the app in place. The local change survived: Create Payroll Workbook still said Customized Yes, and when I opened it in the designer again, the bar now spoke of the existing layer:

The Install, in Order
| # | Where | What |
|---|---|---|
| 1 | Power Platform admin center | An environment with Dataverse, limited to the app's users group |
| 2 | Same | A group team with Basic User, saved twice |
| 3 | Same | The people added to the environment, if it's a trial |
| 4 | SharePoint | A site in the right regional settings |
| 5 | Power Apps | Import the Setup solution |
| 6 | Power Automate | Run the setup flow with the site and the three group IDs |
| 7 | SharePoint | The template and script in Payroll Exports › Setup |
| 8 | Power Apps | Import the app, and pick the site and its lists |
| 9 | Power Apps | In a local unmanaged solution, pick the payroll script again |
| 10 | Power Apps | Share the app with the users group, and send the link |
| 11 | Power Automate | Run-only users for the three flows the app runs |
| 12 | The app | The departments and their approvers |
The Problems I Hit
| Problem | What I saw | Fix |
|---|---|---|
| The CLI crashed while signing in | Sorry, the app encountered a non-recoverable error, after authenticated successfully | Sign in again |
| The payroll script wasn't found | Script not found. It may have been unshared or deleted. | Pick the script again from the new library |
| My guessed address for the Users page | Sorry, there's been a disconnect, then Environment Not Found | My mistake: I typed a page address instead of following See all. The page's own links work |
Clean Up
Microsoft deletes a trial environment 30 days after it's created, with everything in it: both solutions, the local one, the team and the users' records. To remove things sooner:
- The environment: in the admin center, select it, then Delete. A trial environment can only be created and deleted, never backed up or copied, so export anything you want first.
- The site: in the SharePoint admin center, under Active sites (Delete a site). Its lists, library and workbooks go with it.
- The CLI profile:
pac auth delete --name OvertimeDemo.
I'm keeping all three until the series ends.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
| Importing the app before running the setup flow | No lists to pick for its variables | Setup solution, its flow, then the app |
| Picking the development site in the import | The new install reads and writes the development data | Pick the site made for this environment |
| Skipping the template and script | Create payroll workbook has nothing to copy or run | Upload both to Payroll Exports › Setup |
| Editing the payroll flow inside the managed solution | It can't be edited there | Add it to a local unmanaged solution |
| Forgetting the run-only users | Waiting approvals and reports fail for everyone but you | Share the three flows as in Step 11 |
| Sending the link before adding people to a trial environment | Their first try fails | Add them first |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| The import doesn't ask for the site and lists | The zip still has values | Use the release zip from Part 20 |
| The list pickers are empty | The setup flow hasn't run, or ran on another site | Run it with this site's address |
| Script not found in Fill the workbook | The action still holds the development script's ID | Pick the script again (Step 9) |
| Home shows no Waiting for approval or Reports | No departments, or you aren't an approver or in payroll | Add the departments; check the groups |
| A later release doesn't change the payroll flow | The local layer is on top | Remove the layer, import, and pick the script again |
FAQ
Do the app's users need a Power Apps license here?
No. The app and its flows use standard connectors only, and Aisha, Daniel and Leo used it here with their Microsoft 365 licenses. The Power Apps trial was only for creating the environment.
Do approvers need the Approvals User role?
Microsoft's approvals article says people who receive an approval are given Approvals User automatically, except "if a security group was used to control which users have access to the Dataverse environment", as here. Daniel had only Basic User, through the team, and his answer from Outlook went through: the flow received it and approved the entry.
What about the Teams app and the Power BI report?
Neither is in the solutions. The Teams package from Part 16 was made from the app in the development environment, so make a new one from this environment's app. The Power BI report from Part 15 reads the development site's lists; a new site needs its own report, built the same way.
What does an organization installing it do differently?
It uses a production environment, so there's no 30-day limit, and it brings its own site, groups and old workbook. Microsoft's note that people must be added by hand is about trial environments. The order stays the same.
What happens after 30 days?
The trial environment is disabled and then deleted. In the last seven days it can be extended once by 30 days, or converted to production if the tenant has the capacity (About trial environments).
Conclusion
The app now runs in an environment that never saw its development:
- a trial environment limited to the users group, with the group given Basic User and its people added;
- a new site whose lists, library and permissions came from the setup flow, plus the template and script;
- both solutions installed as managed, with the site and lists picked at import;
- the payroll script picked again in a local unmanaged solution, kept as its own layer;
- the app shared, the three flows' run-only users set, and the departments added;
- one entry logged, approved in Outlook and paid in the month's workbook.
Part 22 wraps up the series: what was built, a checklist for going to production, and where to take it next.
Additional Resources
- About trial environments: limits, extending and converting.
- Control user access to environments: what the security group does.
- Import solutions: the import steps.
- Solution layers: managed and unmanaged layers.
- Pre-populate connection references and environment variables for automated deployments: the settings file.
← Previous: Part 20: Run the Solution Checker and Export the Solutions Next → Part 22: Recap, Production Checklist and Next Steps (coming soon)
