Skip to main content

Build an Overtime Timesheet App in Power Apps — Part 21: Install the App in a New Environment

· 35 min read
Jagdish Kumawat
Founder @ Dewiride

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.

  1. Part 1: Plan the App and Set Up the Demo Organization
  2. Part 2: Create the SharePoint Site and Lists
  3. Part 3: Keep Overtime Private with SharePoint Permissions
  4. Part 4: Create the Solution, Environment Variables and Canvas App
  5. Part 5: Build the Home Screen
  6. Part 6: Build the Log Overtime Screen
  7. Part 7: Build the My Overtime Screen
  8. Part 8: Build the Approval Flow for Teams and Outlook
  9. Part 9: Show Approvers What's Waiting
  10. Part 10: Build the Departments Screen
  11. Part 11: Build the Reports Screen
  12. Part 12: Import the Old Excel Timesheet
  13. Part 13: Create the Monthly Payroll Workbook with Office Scripts
  14. Part 14: Create the Payroll Workbook from the App
  15. Part 15: Build the Power BI Overtime Report
  16. Part 16: Share the App and Add It to Microsoft Teams
  17. Part 17: Manage Joiners, Movers and Leavers
  18. Part 18: Build a Setup Flow That Creates the Lists
  19. Part 19: Set SharePoint Permissions from the Setup Flow
  20. Part 20: Run the Solution Checker and Export the Solutions
  21. Part 21: Install the App in a New Environment (you are here)
  22. 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​

PieceWhat it is
Overtime Timesheet DemoA trial environment with Dataverse, in the UK region, open only to the Overtime Timesheet Users group
A group teamGives that group the Basic User role there
/sites/OvertimeTimesheetDemoA new communication site in UK formats and London time, with the lists and library made by the setup flow
Overtime Timesheet Setup and Overtime TimesheetBoth solutions installed as managed, the app pointed at the new site
Overtime Timesheet Local ChangesAn unmanaged solution holding this environment's one change: the payroll flow's script, picked from the new site
SharingThe app shared with the users group, and the three flows the app runs shared with it as run-only
The first useTwo 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 release folder.
  • 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:

The New environment panel with Type Trial, the note Developer environments can no longer be created here, Region United Kingdom, Name Overtime Timesheet Demo, and a summary with Owner Admin User and Database No

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:

The same panel with Change default settings open: Environment group empty, Make this a Managed Environment No, Add a Dataverse data store Yes, and the summary now showing Database Yes, with the Next button

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:

The Add Dataverse panel with Language English (United States), Currency GBP, Security group Overtime Timesheet Users, a generated URL, Enable Dynamics 365 apps off and Deploy sample apps and data off

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:

The environment's Details card: Environment URL org00000000.crm11.dynamics.com, State Ready, Region United Kingdom, Refresh cadence Frequent, Type Trial (29 days remaining), Security group Overtime Timesheet Users, Created by Admin User

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:

The New team panel: Team name Overtime Timesheet Users, Business unit org00000000, Administrator Admin User, Team type Microsoft Entra ID Security Group, Group name Overtime Timesheet Users, Membership type Members, and the Next button

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 Role assignment confirmation dialog: Only the following roles will be assigned to user Manage Team security roles. Do you want to save your changes? Basic User, with Save and Cancel

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:

The Add user panel: User access requirements Enabled in Microsoft Entra ID, Has an active license, Member of the environment's security group, with Olivia Bennett chosen and the Add button

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

The message Olivia Bennett has been added to this environment, but a security role is required in order to access data. Please use manage security role panel to manage roles

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:

The environment's users: Aisha Khan, Daniel Brooks, Admin User, Leo Martin, Maya Patel, Olivia Bennett and Support User, with their usernames and business unit

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):

The Set up your site dialog: Site name Overtime Timesheet Demo, The site name is available, a description, Site address https://contoso.sharepoint.com/sites/OvertimeTimesheetDemo, The site address is available, language English, and the Create site button

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:

The Import a solution panel's Details: Name OvertimeTimesheetSetup, Type Managed, Publisher Dewiride, the description Creates the SharePoint lists and library that the Overtime Timesheet app needs, on any site. Run its flow once, before you install the app., Version 1.0.0.0, Patch No

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:

The Connections step: Re-establish connections to activate your solution, 1 updates needed, and Overtime Timesheet Setup SharePoint, dewiride_OvertimeTimesheetSetupSharePoint, with a green check

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:

The Run flow panel for Set Up Overtime Timesheet, Owner Admin User, with empty boxes for Site URL, Payroll group ID, Admins group ID and Users group ID, each with its description, and the Run flow button

InputValue
Site URLhttps://contoso.sharepoint.com/sites/OvertimeTimesheetDemo
Payroll group IDThe Object ID of Overtime Payroll in Microsoft Entra
Admins group IDThe Object ID of Overtime Admins
Users group IDThe 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 flow's 28-day run history: Nov 30, 05:21 PM, Duration 00:01:28, Status Succeeded

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:

The Overtime Timesheet Demo site's contents: Departments, OvertimeEntries and Settings lists, the Payroll Exports library with 1 item, and the site's default libraries, with Departments and OvertimeEntries in the top navigation

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):

The new site's Payroll Exports > Setup folder with Fill Payroll Workbook.osts and Payroll Template.xlsx, both modified a few seconds ago by Admin User

Step 8: Import the App Solution​

Import OvertimeTimesheet_1_0_0_0_managed.zip the same way. Details:

The Import a solution Details for OvertimeTimesheet: Managed, Publisher Dewiride, the description Overtime Timesheet canvas app, flows and environment variables. Staff log their overtime, department approvers approve it, and payroll gets the monthly totals., Version 1.0.0.0

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:

The Connections step: 7 updates needed, with green checks for Overtime Timesheet Office 365 Outlook, Office 365 Groups, Excel Online (Business), Office 365 Users, Approvals, Overtime Timesheet SharePoint, and SharePoint Required for Environment Variables of type Data source SharePoint

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:

The Environment Variables step filled in: Overtime Timesheet Site Overtime Timesheet Demo, Settings, Payroll Exports, OvertimeEntries and Departments, each with its schema name and description

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

The Solutions page's Managed list with Overtime Timesheet, modified 1 minute ago, and Overtime Timesheet Setup, 19 minutes ago, both version 1.0.0.0 by Dewiride

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

The Overtime Timesheet solution's objects with the bar You cannot directly edit the objects within a managed solution. If the managed properties for solution objects are set to allow customization, you can edit them from another unmanaged solution, and the flows Create Payroll Workbook to Overtime Approval, all Managed Yes, Customized No, On

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:

The New solution panel: Display name Overtime Timesheet Local Changes, Name OvertimeTimesheetLocalChanges, Publisher CDS Default Publisher (Crc95c7), Version 1.0.0.0, and the description This environment's own changes to the Overtime Timesheet solution: the payroll flow's script, picked from this site's library, Package type Unmanaged

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):

The Add existing cloud flows panel on From Dataverse, with 1 cloud flow selected: Create Payroll Workbook, and the app's other flows and Set Up Overtime Timesheet listed, all Managed Yes, Customized No, On

Open it and change the action​

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

The designer for Create Payroll Workbook with the bar Editing this managed flow will create customizations stored in a new unmanaged layer, and the flow's steps from Manually trigger a flow to Create the workbook

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:

The Fill the workbook action: Workbook Location and Script Location set to the Overtime Timesheet Site variable, Workbook Library and Script Library showing b!000 IDs, Workbook Id, Script /Setup/Fill Payroll Workbook.osts, monthTitle formatDateTime and entries Output

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

The Workbook Library drop-down open with Select a document library from the drop-down, listing Documents, Payroll Exports and Enter custom value

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 file picker beside the Script box, inside Setup, listing Fill Payroll Workbook.osts and Payroll Template.xlsx

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

Fill the workbook after the changes: both libraries Payroll Exports, Script /Setup/Fill Payroll Workbook.osts, monthTitle with the formatDateTime expression and entries with Output

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):

The Solution Layers page for Create Payroll Workbook: Order 2 Unmanaged layer, Default Publisher for org00000000, Active; Order 1 OvertimeTimesheet, Dewiride

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):

The Share Overtime Timesheet dialog with the note This app contains data that may require additional permissions for users to be able to play the app, Overtime Timesheet Users added, and the Share button

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

The dialog You've shared Overtime Timesheet with OU. They won't be notified automatically. Copy and send them this link to let them know, with Copy link

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:

FlowRun-only users
Get Waiting ApprovalsOvertime Timesheet Users
Get Overtime ReportOvertime Timesheet Users
Create Payroll Workbook NowOvertime Payroll

The Manage run-only permissions panel for Get Waiting Approvals: Overtime Timesheet Users invited, and under Connections Used, Office 365 Users set to Provided by run-only user and SharePoint set to Use this connection (admin@EXAMPLE.COM)

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:

The dialog Allow Overtime Timesheet to access your data? with Office 365 Users (Get my profile (V2), Get user photo metadata), SharePoint (Read records, Write records) and Office 365 Groups (List group members), each with a green check, and the Allow button

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 app's Home screen: Welcome, Admin, Department: Management, and the tiles Log overtime, My overtime and Departments

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

The Add department screen: Name Emergency Department, Approvers Olivia Bennett, Active on, and Save

The Departments screen with The department was added, listing Emergency Department, Approvers Olivia Bennett, Active, and Radiology, Approvers Daniel Brooks, Active

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:

The Log overtime screen: Date the shift started 30/11/2026, Start 07:00, Finish 09:30, Unpaid break 0, Hours worked 2.50 (2 h 30 min), Department Radiology, Reason Came in early to cover the morning CT list

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:

The approval email: Approvals, Power Automate, Overtime for Aisha Khan, Monday 30/11/2026, 2.50 hours, Requested for Aisha Khan, with the department, date, times, break, hours and reason, and Approve and Reject buttons

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

The email after responding: Approved, Date Submitted Monday, 30 November 2026 18:03, Comments Thanks for covering the CT list.

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 Reports screen for November 2026: Showing All departments, Approved hours in November 2026: 2.50, 1 entry from 1 person, Create payroll workbook and Open the workbook, a column chart with Radiology at 2.5, and Aisha Khan 2.50 hours in Radiology

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​

Terminal
pac auth create --name OvertimeDemo --deviceCode --environment "Overtime Timesheet Demo"
Output
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:

Terminal
pac solution list
Output
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​

Terminal
pac solution create-settings --solution-zip release/OvertimeTimesheet_1_0_0_0_managed.zip --settings-file OvertimeTimesheet.settings.json
Output
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:

A macOS-style code window titled OvertimeTimesheet.settings.json, showing the Overtime Timesheet Site variable with Value set to the demo site's address and ParameterKey dataset, the OvertimeEntries list variable with its list ID and ParentSchemaName, and the SharePoint and Office 365 Users connection references with their ConnectionId and ConnectorId, with a comment where the unchanged keys are left out

OvertimeTimesheet.settings.json (part, filled 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:

EntriesValue
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 referencesThe 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​

Terminal
pac solution import --path release/OvertimeTimesheet_1_0_0_0_managed.zip --settings-file OvertimeTimesheet.settings.json
Output
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 designer bar Editing this managed flow will create customizations stored in the existing active unmanaged layer, with Learn more and a Remove unmanaged layer button

The Install, in Order​

#WhereWhat
1Power Platform admin centerAn environment with Dataverse, limited to the app's users group
2SameA group team with Basic User, saved twice
3SameThe people added to the environment, if it's a trial
4SharePointA site in the right regional settings
5Power AppsImport the Setup solution
6Power AutomateRun the setup flow with the site and the three group IDs
7SharePointThe template and script in Payroll Exports › Setup
8Power AppsImport the app, and pick the site and its lists
9Power AppsIn a local unmanaged solution, pick the payroll script again
10Power AppsShare the app with the users group, and send the link
11Power AutomateRun-only users for the three flows the app runs
12The appThe departments and their approvers

The Problems I Hit​

ProblemWhat I sawFix
The CLI crashed while signing inSorry, the app encountered a non-recoverable error, after authenticated successfullySign in again
The payroll script wasn't foundScript not found. It may have been unshared or deleted.Pick the script again from the new library
My guessed address for the Users pageSorry, there's been a disconnect, then Environment Not FoundMy 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​

MistakeWhat happensDo this instead
Importing the app before running the setup flowNo lists to pick for its variablesSetup solution, its flow, then the app
Picking the development site in the importThe new install reads and writes the development dataPick the site made for this environment
Skipping the template and scriptCreate payroll workbook has nothing to copy or runUpload both to Payroll Exports › Setup
Editing the payroll flow inside the managed solutionIt can't be edited thereAdd it to a local unmanaged solution
Forgetting the run-only usersWaiting approvals and reports fail for everyone but youShare the three flows as in Step 11
Sending the link before adding people to a trial environmentTheir first try failsAdd them first

Troubleshooting​

SymptomLikely causeFix
The import doesn't ask for the site and listsThe zip still has valuesUse the release zip from Part 20
The list pickers are emptyThe setup flow hasn't run, or ran on another siteRun it with this site's address
Script not found in Fill the workbookThe action still holds the development script's IDPick the script again (Step 9)
Home shows no Waiting for approval or ReportsNo departments, or you aren't an approver or in payrollAdd the departments; check the groups
A later release doesn't change the payroll flowThe local layer is on topRemove 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​

← Previous: Part 20: Run the Solution Checker and Export the Solutions Next → Part 22: Recap, Production Checklist and Next Steps (coming soon)