# RenewLock installer kit: technical reference

This file is the technical reference for the IT person who installs, upgrades or removes RenewLock. It holds the detail that the customer-facing install page leaves out. The short, click-by-click version for office managers is https://www.renewlock.com/install, and its companion Help page is https://www.renewlock.com/help. `RUNBOOK.md` next to this file is the same procedure written for a person, or a person's AI assistant, to follow step by step; `skill/SKILL.md` is the agent skill for the AI-assisted path.

Nothing in the kit needs vendor access. We never sign in to your tenant, no component makes outbound calls, and nothing is stored outside your Microsoft 365.

## Contents

1. What the kit contains
2. What gets installed, and nothing else
3. Who does what
4. Three ways to run the install
5. The script path in full
6. Path A internals: the flows solution
7. Path B internals: the legacy flow package
8. The Dataverse precondition and the Create a database fix
9. Time zone and currency
10. Group owners
11. Verification checks
12. Upgrade
13. Uninstall
14. Troubleshooting for IT
15. Where the customer-facing documentation lives

## 1. What the kit contains

| File | Version | Purpose | SHA-256 |
|---|---|---|---|
| `RenewLock.sppkg` | 1.0.0.24 | SPFx package holding the RenewLock dashboard web part. Uploaded once to the tenant app catalog. | See the Files table on https://www.renewlock.com/help#files |
| `JRMRenewalGuard_1_0_0_10.zip` (published as RenewLock-reminders.zip) | 1.0.0.10 | Power Platform solution: three flows, one environment variable, five connection references (Path A). Published on the install page as `RenewLock-reminders.zip`. | See the Files table on https://www.renewlock.com/help#files |
| `RenewLock.template.xml` | 2026.10.17 | PnP provisioning template: the four lists with columns, views, formatting and defaults. Applied by the script, or by hand with `Invoke-PnPSiteTemplate`. | See the Files table on https://www.renewlock.com/help#files |
| `Install-RenewLock.ps1` | 2026-10-17 | The script path: site, lists, package, page and flows in one run. | See the Files table on https://www.renewlock.com/help#files |
| `RUNBOOK.md` | | Step-by-step procedure for a person or an agent, with every pop-up and what to click. | |
| `skill/SKILL.md` | | Agent skill for the AI-assisted path (Claude Code, GitHub Copilot agent mode). Also published at https://www.renewlock.com/install/skill/SKILL.md. | |
| `tools/gen_pnp_template.py` | | Generates `RenewLock.template.xml` from the same list schema the web part's in-page setup uses (`site/provision.js`). | |
| `../solution/tools/gen_legacy_package.py` | | Builds the Path B legacy flow package for one site URL. Its `--template` mode exports the JSON that the install page's in-browser builder consumes. | |
| `test/RenewLock-flows-shyinc029.zip` | | Sample Path B package from the 15 Oct 2026 end-to-end test in a tenant with no Dataverse database. | |

The SHA-256 checksums of the published copies are in the Files table on https://www.renewlock.com/help#files, regenerated with every release, so a reviewer can verify a download there.

## 2. What gets installed, and nothing else

**One SharePoint site** (any name; the examples use RenewLock) gains four lists and a home page carrying the dashboard web part.

- Lists: `Renewals`, `Checkpoints`, `Milestones` (seeded with 120 / 90 / 60 / 30 / 14 / 7 days) and `Settings`.
- `Settings` holds `TimeZone`, `Currency` (ISO 4217 code, default `USD`), `GroupMessageLimit` (default 10), `EngineHeartbeat`, `FlowsVersion` (written by RL-Engine) and `SchemaVersion`, among others.
- The in-page setup (the web part's "Set up RenewLock on this site" card) and the PnP template create the same lists. Both only add what is missing, so both are safe to repeat. Setup runs with the user's own permissions and needs Manage Lists (a site owner).
- **The Setup card in detail (1.0.0.20).** It shows only while the lists are missing; the dashboard chrome stays hidden until setup is done. Header: "About fifteen minutes from here. Nothing leaves this site." Stepper: 1 Create the lists (you, about a minute), 2 Import the flows (Power Automate, 5 to 10 min), 3 First run (click Run once). While it checks rights it shows "Checking your permissions…"; a user without Manage Lists sees "Creating lists needs a site owner (Manage Lists). Ask an owner of <site> to open this page and click Set up, or ask them to add you to the site's Owners group." and a greyed-out button. **Set up this site** asks inline "Create the four RenewLock lists on <site>? Takes one to two minutes. You can watch each step. Nothing else on the site changes." with **Yes, create the lists** / **Back**. The progress log prints lines such as "List Milestones", "Columns for Milestones", "Views and defaults for Renewals" and "Created list Milestones / Settings / Renewals / Checkpoints", then the green bar "Lists are ready on <site>. Nothing else was changed." A failed step adds "Setup can be run again; nothing needs undoing."; a failed column changes the bar to "Lists are ready on <site>, but <n> column could not be created (listed above). Click Set up again after fixing the cause; it only adds what is missing." The card then shows Step 2 (the **Download the flows solution** link, a 20 KB zip, the Power Automate tenant check, the "No database found" note with the Path B pointer, and the import steps) and Step 3 (first run). Buttons on the card: Back, Full install guide, Install guide, Open the dashboard, Set up this site, Yes, create the lists.

**The tenant app catalog** gains one package, `RenewLock.sppkg`, enabled for all sites.

- The package requests no API permissions, so no API-access approval appears.
- The **Confirm data access** panel reads in full: "The app you're about to enable will have access to data by using the identity of the person using it. Enable this app only if you trust the developer or publisher. This app gets data from: SharePoint." Keep "Enable this app and add it to all sites" selected (the default). Its **Add to Teams** checkbox is ticked by default; untick it unless a Teams app is wanted. **Confirm**, then the panel "This app has been enabled" ("The functionality provided by this app is now available on all sites.") closes with **Close**.
- If the tenant has never had an app catalog, the first visit to SharePoint admin center > More features > Apps > Open creates one at `/sites/appcatalog` ("Creating the site for storing apps. This might take a few minutes, but only needs to be done once.").

**One Power Platform environment** (normally the default) gains one of the following.

- Path A: one solution, **RenewLock reminders**, containing the flows `RL-Engine`, `RL-Prompt` and `RL-Rollover`, one environment variable **RenewLock site** (schema name `jrm_RG_SiteUrl`) and five connection references (SharePoint, Microsoft Teams, Office 365 Outlook, Office 365 Users, Office 365 Groups). The environment must have a Dataverse database to hold the solution; see section 8.
- Path B: the same three flows imported as a legacy package under My flows, with the site URL baked in. No database, no environment variable, no connection references.

**Five connections** owned by the account that runs the flows: SharePoint, Microsoft Teams, Office 365 Outlook, Office 365 Users and Office 365 Groups. Standard connectors only. Use a shared or service account, not a person who may leave: the flows stop when that account is switched off. A personal account works for a pilot. These are the accounts the reminders run as, not the renewal owners.

What the three flows do:

- `RL-Engine`, daily at 6:00 AM Eastern: bands every renewal, opens checkpoints at each milestone, escalates, sends the digest, writes the heartbeat.
- `RL-Prompt`, when a checkpoint opens or is reassigned: sends the Teams card (person chat or team channel) or the group email and messages, and records the answer. Section 10 covers group owners.
- `RL-Rollover`, when a renewal is verified: closes the round, sets the next expiry and resets the phase.

Not changed: any other site, list, page, permission, app, flow, policy or licence. RenewLock stores nothing in Dataverse. No premium connectors, no extra licences, no Entra app registration or admin consent for RenewLock itself (the script path signs in through the PnP PowerShell app your organisation registers once; the in-page path uses nothing). No outbound traffic and no telemetry: the web part makes REST calls only to its host site. Standard SharePoint permissions govern access to the lists, and the customer's Purview retention labels apply to them like any other SharePoint content.

## 3. Who does what

| Role | Needed for | Time |
|---|---|---|
| SharePoint Administrator | Uploading and enabling `RenewLock.sppkg` in the app catalog (step 2). Also runs the script, if that path is used. | About 5 minutes, plus a few minutes' wait the first time if the tenant has no app catalog yet |
| Site owner (Manage Lists) on the RenewLock site | Creating the site, editing the home page, running the in-page setup (steps 1 and 3) | About 10 minutes |
| Maker in the target environment (any licensed user in the default environment), signed in to Power Automate in the same tenant as the site | Importing the flows on Path A or Path B, creating the connections, turning the flows on (step 4) | 5 to 10 minutes including connections |
| Global Administrator or Power Platform Administrator | Only if Solutions shows "No database found": clicking **Create a database** once | A few minutes, once |
| The account that runs the flows | Owns the five connections and, on Path B, the flows themselves. Needs edit access to the RenewLock site and, for a group owner with a team, membership of that team | |

Global Administrator is otherwise not required. The whole install is about 25 minutes the first time, on any of the three ways below.

## 4. Three ways to run the install

1. **In-page setup (no script).** Enable the app once (step 2), add the RenewLock dashboard web part to the site's home page, click **Set up this site**, confirm with **Yes, create the lists**, then import the flows (Path A, or Path B when the environment has no database) and run RL-Engine once. This is the path the install page documents.
2. **Script.** `Install-RenewLock.ps1` does site, lists, package, page and the Path A flows import in one run. Section 5.
3. **AI-assisted.** Point the agent at `skill/SKILL.md`. It runs the steps one at a time, explains each, and stops for the human at every Microsoft sign-in, the PnP consent page, the app catalog upload and its Confirm data access panel, a Solutions page that says "No database found", the Path B file picker, every connection, turning the flows on, and anything that would buy a licence. It never handles a password. Works with Claude Code and GitHub Copilot agent mode; Microsoft 365 Copilot cannot run installs.

All three end on the same step 4 choice, Path A or Path B, and both paths need the same five connections.

## 5. The script path in full

### Requirements

- PowerShell 7.
- PnP.PowerShell. The script installs it for the current user on first run (`Install-Module PnP.PowerShell -Scope CurrentUser -Force -AllowClobber`).
- The .NET SDK, for the Power Platform CLI. The script installs the CLI on first run (`dotnet tool install --global Microsoft.PowerApps.CLI.Tool`). Without the .NET SDK the script stops with a message; run it with `-SkipFlows` and import the flows by hand.
- An Entra app registration for PnP PowerShell, passed as `-ClientId` (next heading). The script refuses to start without it.
- An existing tenant app catalog. The script does not create one; if `Get-PnPTenantAppCatalogUrl` returns nothing it stops and asks a SharePoint Administrator to open SharePoint admin center > More features > Apps > Open once, wait for the catalog to be created, then re-run.
- A Dataverse database in the target environment, for step 4 (section 8).
- `RenewLock.template.xml`, `RenewLock.sppkg` and `JRMRenewalGuard_*.zip` next to the script. The script checks for the first two at the start, picks the highest-numbered `JRMRenewalGuard_*.zip` it finds, and stops if there is none unless `-SkipFlows` is given.
- The account running it: a SharePoint Administrator for steps 1 to 3 and a Maker in the target environment for step 4.

### One-time PnP app registration (`-ClientId`)

PnP PowerShell retired its shared sign-in app in 2024, so each organisation registers its own Entra app once. An admin runs:

```powershell
Register-PnPEntraIDAppForInteractiveLogin -ApplicationName "PnP PowerShell" -Tenant CONTOSO.onmicrosoft.com -Interactive
```

It prints an application (client) ID. Pass that as `-ClientId`. If the org already has one, ask the SharePoint admin for it. Run without `-ClientId` and the script prints this same line with your tenant filled in, then stops. On the very first PnP sign-in in the tenant a **Permissions requested** page appears for "PnP PowerShell", "PnP Management Shell" or whatever the org named the app; an admin accepts it once.

### Parameters

| Parameter | Required | Meaning |
|---|---|---|
| `-SiteUrl` | Yes | Full URL of the site to create or use, for example `https://contoso.sharepoint.com/sites/RenewLock`. The admin center URL is derived from it (`https://contoso-admin.sharepoint.com`). |
| `-Environment` | No | Power Platform environment name or ID for the flows. Default: your default environment. It must already have a Dataverse database (most do). |
| `-ClientId` | Yes | Entra app (client) ID your organisation registered for PnP PowerShell, as above. |
| `-TimeZone` | No | Windows time zone name written to the `Settings` list. Default `Eastern Standard Time`. A site that already has a `TimeZone` value keeps it unless you pass `-TimeZone`. |
| `-Currency` | No | ISO 4217 code written to `Settings.Currency`, three letters, upper-cased. Default `USD`. Like `-TimeZone`, it is written when you pass it, or when the row is missing or blank; a re-run without it keeps the site's own value, so an upgrade does not need it. |
| `-SkipFlows` | No | SharePoint only (steps 1 to 3). Import the flows later by hand, Path A or Path B. |
| `-Force` | No | Skip the "Type yes to continue" confirmation, for unattended or agent-driven runs that already confirmed the plan. |

Example:

```powershell
.\Install-RenewLock.ps1 -SiteUrl https://contoso.sharepoint.com/sites/RenewLock -Environment "Contoso (default)" -ClientId 00000000-0000-0000-0000-000000000000 -TimeZone "Central Standard Time" -Currency CAD
```

### Plan preview, confirmation and transcript

The script starts a transcript at `Install-RenewLock-<yyyyMMdd-HHmm>.log` next to itself before it does anything, then prints its plan and waits:

```
Plan. Nothing happens until you confirm.
 1. Site       <SiteUrl>  (create if missing; add 4 lists: Renewals, Checkpoints, Milestones, Settings)
 2. Catalog    upload RenewLock.sppkg to the tenant app catalog, enable for all sites (needs SharePoint Administrator)
 3. Page       put the RenewLock dashboard on the site's home page
 4. Flows      import JRMRenewalGuard_1_0_0_10.zip into environment <Environment>     (or: skipped (-SkipFlows))
 Settings    TimeZone = <TimeZone>, Currency = <Currency> (change later in the Settings list)
             A site that already has RenewLock keeps its own TimeZone and Currency unless you pass -TimeZone or -Currency.   (only when one is not passed)
Not changed: any other site, list, app, flow, policy or licence. Nothing leaves your tenant.
Sign-ins you will see: admin center, the site, the app catalog, and the Power Platform CLI.
Transcript: <path>
Type yes to continue
```

Anything other than `yes` ends the run with "Nothing was changed." `-Force` skips the prompt. The transcript holds the full console output, including the Power Platform CLI output if step 4 fails.

### What each step runs

1. **Site and lists.** Signs in to the SharePoint admin center with `Connect-PnPOnline -Url <admin url> -Interactive -ClientId <id>`. If `Get-PnPTenantSite` does not find the site, creates it with `New-PnPSite -Type CommunicationSite -Title 'RenewLock' -Url <SiteUrl>` and waits 20 seconds. Then signs in to the site, applies the template with `Invoke-PnPSiteTemplate -Path .\RenewLock.template.xml -ClearNavigation` (seed rows are matched on Title and skipped when present, so a re-run never duplicates them), and sets the web title to RenewLock. It then updates columns in place, because the template matches columns by ID and sites made by the dashboard or the browser installer have other IDs: `Owner`, `Backup` and `Assignee` are widened to people and groups by rewriting their SchemaXml and reading it back, and the column descriptions are set. A column that will not widen prints a yellow line with the manual fix. The code rule XXX-XXX-XXX goes on only when every existing code already passes; otherwise the script lists up to five bad codes and leaves the rule off, so those rows still save. It writes `-TimeZone` and `-Currency` into the `Settings` items of the same names when you pass them, or when an item is missing or blank; otherwise it keeps the site's own value and prints `kept as`. It records `SchemaVersion` 2026.10.17 only when no column failed and the code rule was not held. The site's own regional settings are left as they are.
2. **App catalog.** Signs in to the catalog URL from `Get-PnPTenantAppCatalogUrl` and runs `Add-PnPApp -Path .\RenewLock.sppkg -Scope Tenant -Overwrite -Publish -SkipFeatureDeployment`. The run log records the package title and version that was enabled.
3. **Home page.** Signs in to the site, takes `Home.aspx` (creating it with `Add-PnPPage -Name 'Home' -LayoutType Home -HeaderLayoutType NoImage` if absent). If the page does not already hold the dashboard (web part ID `ebf40cd7-6368-44f8-b6ad-52b406a51f41`), it clears the page's existing controls, adds a one-column full-width section and runs `Add-PnPPageWebPart -Page 'Home' -Component 'RenewLock dashboard' -Section 1 -Column 1`. It then publishes the page with no header and sets `SitePages/Home.aspx` as the site home page. Note the difference from the manual path, where the Standard communication template's home page is `TopicHome.aspx`.
4. **Flows (Path A).** Writes a deployment settings file to `%TEMP%\renewlock.deploymentsettings.json` that sets the environment variable `jrm_RG_SiteUrl` to the site URL (trailing slash trimmed). Runs `pac auth select --name RenewLock`, or `pac auth create --name RenewLock` on first use (a browser window opens; sign in as a Maker in the target environment). Runs `pac env select --environment <Environment>` when one was given. Then `pac solution import --path .\JRMRenewalGuard_1_0_0_10.zip --settings-file <settings> --activate-plugins --force-overwrite`. The script picks the newest `JRMRenewalGuard_*.zip` by version number, so `_10` wins over `_9`.

Every step is idempotent. A site that exists is reused, lists that exist are completed, the package is overwritten in place, the web part is only added if missing, and the solution import upgrades over an existing one. Re-running the script is therefore also the upgrade path.

### Sign-ins the script opens

Before each one it prints "A Microsoft sign-in window will open for `<where>`. Sign in with the account named in the plan." Order: the SharePoint admin center, the RenewLock site, the app catalog (SharePoint Administrator), the site again for the home page, then, unless `-SkipFlows`, a browser window for the Power Platform CLI. The first PnP sign-in in a tenant adds the one-time **Permissions requested** page.

### When step 4 stops

`pac solution import` needs a Dataverse database in the target environment, the same precondition as a manual solution import. On an environment without one the script completes steps 1 to 3, prints "Could not import the flows solution. The Power Platform CLI reports a database or environment problem (its output is above)", and then prints both fixes:

- Have a Global Administrator or Power Platform Administrator click **Create a database** once (section 8), then import by hand from Power Automate > Solutions > Import solution using the zip next to the script, or re-run the script; finished steps are skipped.
- Or take Path B (section 7). The message prints the `gen_legacy_package.py` command with your site URL filled in and the install page's builder as the alternative, then the My flows > Import > Import Package (Legacy) procedure.

After Path B the script has nothing left to do. If you re-run it for any reason, add `-SkipFlows` so step 4 is not attempted again.

Any other failure ends with "Stopped: `<message>`" and "Nothing needs undoing. Fix the cause and run the script again; finished steps are skipped." A `pac` failure also names the transcript that holds the CLI output.

### What the script leaves to a person

It cannot create connections or turn flows on, and ends by printing those two steps:

- **Connections.** Open Power Automate from this tenant's Microsoft 365 app launcher (make.powerautomate.com opens in whichever organisation the browser used last and has no account switcher), check the environment picker, then Solutions > RenewLock reminders > Connection references. For SharePoint, Microsoft Teams, Office 365 Outlook, Office 365 Users and Office 365 Groups pick or create a connection with the account that should run the flows (a service account is best). A sign-in window opens for each new one; click Accept.
- **Turn on** RL-Engine, RL-Prompt and RL-Rollover from the same solution page, then open RL-Engine and click Run > Run flow.

Then open the site. The dashboard header shows **Flows connected**, and **Import CSV** loads an existing tracker. With `-SkipFlows` the summary adds: if you took Path B instead, its connections were mapped during the import; only check that the three flows are turned on.

## 6. Path A internals: the flows solution

`JRMRenewalGuard_1_0_0_10.zip` is a Power Platform solution. Its display name in Power Automate is **RenewLock reminders**.

- Contents: the flows RL-Engine, RL-Prompt and RL-Rollover; the environment variable **RenewLock site** (schema name `jrm_RG_SiteUrl`); five connection references, one each for SharePoint, Microsoft Teams, Office 365 Outlook, Office 365 Users and Office 365 Groups (`jrm_rg_groups`, which finds the members of a group that owns a renewal).
- The flows read the site URL from the environment variable, so one solution file serves any site, and each connection reference binds its connector to a connection chosen at import time. Both are set once and survive upgrades.
- Precondition: a Dataverse database in the environment, because solutions live in one (section 8). The solution stores no RenewLock data there.

**Manual import.** Open Power Automate from the target tenant's Microsoft 365 app launcher, or use `https://make.powerautomate.com/environments/Default-<tenant id>/solutions` (your Microsoft Entra tenant ID in place of `<tenant id>`). Bare make.powerautomate.com opens in whichever organisation the browser last used and has no account switcher, so confirm the account menu top right shows your organisation and the environment picker shows `<Org> (default)`. Then Solutions > Import solution > Browse > pick the zip > Next > Next. The **Connections** step shows five rows; for each pick an existing connection or **New connection** (a Microsoft sign-in window opens; sign in as the account that should run the flows; click **Accept**; green ticks). The **Environment variables** step shows one box, **RenewalGuard site**; paste the site URL; click **Import**. A yellow "Currently importing" bar runs one to three minutes; keep the tab open. When the green "imported successfully" bar appears, open the solution and use each row's menu > **Turn on** for RL-Engine, RL-Prompt and RL-Rollover.

**CLI import**, which is what the script does:

```powershell
pac auth create
pac solution import --path .\JRMRenewalGuard_1_0_0_10.zip --settings-file .\settings.json --activate-plugins
```

where `settings.json` is a deployment settings file that sets `jrm_RG_SiteUrl` to the site URL. Connection references are left for a person to bind afterwards under Solutions > RenewLock reminders > Connection references.

**Upgrade.** Import the new `JRMRenewalGuard_<version>.zip` over the old one; the solution upgrades in place and keeps the connections and the site URL.

## 7. Path B internals: the legacy flow package

Use Path B when Solutions shows "No database found" and nobody will click Create a database, or when you simply prefer not to add a database. The three flows import as a package from My flows > Import > Import Package (Legacy). Dataverse is never involved. Tested end to end in a new tenant with no Dataverse database on 15 Oct 2026.

### Building the package

- **In the browser.** Open https://www.renewlock.com/install#path-b, paste the site URL into the site address box and click **Download flows package**. The builder (`/install/flows.js`, using JSZip) runs entirely in the browser from a template exported by the generator below; nothing is uploaded anywhere. The file is `RenewLock-flows-<site>.zip`.
- **From the kit.** `python solution/tools/gen_legacy_package.py <site url> <out.zip> [<solution zip>]`. It defaults to the highest-numbered `JRMRenewalGuard_*.zip` in the `solution` folder. The site URL must look like `https://tenant.sharepoint.com/sites/Name` (`.sharepoint.us` and `.sharepoint-df.com` hosts are accepted too); a trailing slash is trimmed. It prints the output path, size, flow count, site and a count of leftover environment-variable references, which should be 0.
- **Template export.** `python solution/tools/gen_legacy_package.py --template <flows-legacy-template.json> [<solution zip>]` writes the three flow definitions with `__SITE_URL__` in place of the site, plus the connector table. That file is what `/install/flows.js` consumes, so the browser builder and the CLI produce the same package.

### What the generator does

1. Reads the `Workflows/*.json` flow definitions out of the solution zip.
2. Bakes the site URL in: every reference to the environment variable `RenewalGuard site (jrm_RG_SiteUrl)` is replaced by the literal URL, and the flow parameters are reduced to `$connections` and `$authentication`. The result has no environment variable, which is why there is one package per site.
3. Gives each flow a fixed ID (one GUID each for RL-Engine, RL-Prompt and RL-Rollover, constant across builds) so a later import can choose **Update** instead of creating duplicates.
4. Writes the zip in the layout below.

### Package layout

Verified against a real Power Automate export in Oct 2026:

```
manifest.json                                        root manifest: details and resources
Microsoft.Flow/flows/manifest.json                   packageSchemaVersion 1.0; flowAssets.assetPaths lists one key per flow
Microsoft.Flow/flows/<flow resource key>/definition.json
Microsoft.Flow/flows/<flow resource key>/apisMap.json
Microsoft.Flow/flows/<flow resource key>/connectionsMap.json
```

- Each flow lives in a folder named by its resource key in the root manifest (a GUID). `definition.json` holds the flow: its fixed ID, display name, the baked definition, and `connectionReferences` with `source: Invoker` for each connector it uses. `apisMap.json` maps each connector name (`shared_sharepointonline`, `shared_teams`, `shared_office365`, `shared_office365users`, `shared_office365groups`) to its API resource key in the root manifest; `connectionsMap.json` maps the same names to the connection resource keys.
- The root manifest's `resources` holds, per connector, an API resource (`Microsoft.PowerApps/apis`, `configurableBy: System`) and a connection resource (`Microsoft.PowerApps/apis/connections`, `configurableBy: User`, `suggestedCreationType: Existing`). The connection resources carry **no id and no name**. That is what makes the import wizard show them as "Select during import" and substitute whichever connection the importer picks. Each flow resource (`Microsoft.Flow/flows`, `creationType: Existing, New, Update`, `hierarchy: Root`) depends on its connection and API resources.
- The manifest's `details.displayName` is "RenewLock flows" and its description names the site and states that the package needs no Dataverse database.

### Importing the package

Open Power Automate with the same tenant check as Path A, then My flows > Import > Import Package (Legacy) > Upload > pick the zip (Upload opens only the browser's file picker). The **Review Package Content** page lists three flows with Import setup "Create as new" and five Related resources (SharePoint, Microsoft Teams, Office 365 Outlook, Office 365 Users, Office 365 Groups) marked with a red (!) and "Select during import". For each one: click the wrench under Action, click **Refresh list**, click the row with your account, click **Save**; the row then shows your account. If the list says "No items", that connection does not exist yet: open Connections in the left menu (a second tab keeps the wizard open) > **New connection** > pick the connector > **Create** > sign in as the account that should run the flows > **Accept**. The first connection asks for a sign-in; the other four usually connect silently. Back in the wizard click Refresh list again. With all five mapped, click **Import**. A bar says "Importing your package ... Don't navigate away" for one to two minutes, then "All package resources were successfully imported." The flows arrive turned off (a small no-entry badge on each flow icon in My flows): open RL-Engine, RL-Prompt and RL-Rollover in turn and click **Turn on**. Then open RL-Engine > Run > Run flow.

### Trade-offs, stated plainly

- The site URL is baked in, so one package per site.
- The importing user owns the flows.
- An upgrade means importing the new package again and choosing **Update** for each flow.
- There is no environment variable and no connection reference.
- Microsoft labels the import "Legacy".
- Both paths use the same five connections and take about the same time (5 to 10 minutes including connections).

The web part's Setup card (1.0.0.20) points to Path B from its "No database found" step, and the script's step 4 failure message does the same.

## 8. The Dataverse precondition and the Create a database fix

RenewLock stores nothing in Dataverse. Path A needs the environment to have a Dataverse database only because a solution lives in one. Most environments already have it and never see this; a brand-new tenant may not.

**Symptom.** Power Automate > Solutions shows "No database found. Solutions are built on a Dataverse database." with only a **Create a database** button, and no Import solution command. `pac solution import` stops on the same environment, so the script's step 4 fails there too.

**Fix.** A Global Administrator or Power Platform Administrator clicks **Create a database** once on that page, keeping the defaults; it takes a few minutes. If that button is unavailable, the same admin does it in the Power Platform admin center > Environments > the default environment > Add database. Reload the Solutions page; Import solution appears. Then carry on with Path A, or re-run the script.

**No admin available, or no database wanted.** Take Path B (section 7), which needs no database.

The database stays after an uninstall. It is a tenant feature and holds nothing of RenewLock's once the solution is gone.

## 9. Time zone and currency

Countdown days, the weekly digest day and every date in a message follow the `TimeZone` value in the `Settings` list. It is a Windows time zone name, default `Eastern Standard Time`. Set it before the first engine run: the script writes its `-TimeZone` parameter there (on a site that already has a value, only when you pass it); on the in-page path edit the `TimeZone` item in `Settings` (for example `Central Standard Time` or `GMT Standard Time`). The daily RL-Engine trigger itself runs at 6:00 AM Eastern, so a customer in Pacific gets the run at 3:00 AM local, which is before anyone reads it. The site's regional settings are not changed by RenewLock.

Money follows the `Currency` value in `Settings`: an ISO 4217 code, default `USD` (blank also means USD). The dashboard formats it with the browser's number format; the flows put a symbol before the amount with no decimals (an unknown code shows as the code and a space, for example `XYZ 1,500`). The script writes its `-Currency` parameter there (on a site that already has a value, only when you pass it) and the browser installer offers a picker. On a site that already has RenewLock, the browser installer fills its form from the site's `Settings` and keeps the time zone, currency, opaque mode and lead time you do not change. The SharePoint list columns keep their own currency format (LCID 1033, `$`). Opaque mode hides all money; the web part's **Hide costs** hides it on the dashboard only. `AnnualCost` is the total yearly cost for all seats (`Qty` is for records and is not multiplied in), and the optional `LapseFee` ("Fee if it lapses") appears in the at-risk tiles, the Teams card, the emails and the weekly digest.

## 10. Group owners

From schema 2026.10.17 the `Owner` and `Backup` columns on Renewals and `Assignee` on Checkpoints accept people and groups (`UserSelectionMode="PeopleAndGroups"`). `Supervisor` and `AnsweredBy` stay one person. Supported: a Microsoft 365 group (with or without a team), a security group, or a SharePoint group of the RenewLock site. "Everyone" and "Everyone except external users" cannot own a renewal; they count as unreachable.

How RL-Prompt reaches a group:

- **Microsoft 365 group with a team.** The adaptive card goes to the team's General channel as the Flow bot; anyone in the team can answer and the first answer is recorded. An email also goes to the group's address, whatever `EmailCopies` says.
- **Any other group.** One email to the group's address, or to the members when the group has none, plus a short Teams message to each member with a mailbox, up to `GroupMessageLimit` (default 10). Bigger groups get the email only. Members answer in the dashboard or the list.
- **Nobody reachable** (group deleted, no team, no address and no member with a mailbox). RL-Prompt sets `Unreachable` on the checkpoint and RL-Engine treats the group like a disabled account: it escalates on the next run and, at hop 0, sets `OwnerVacant`.

`DeliveredTo` on each checkpoint records where a group's reminder went (for example `Teams channel: Renewals / General; email: renewals@contoso.com`).

Setup checklist for each group (the same list is on https://www.renewlock.com/help#groups):

1. Give the group edit access to the RenewLock site: Settings > Site permissions > Share site, add the group as a member. Without it, members cannot answer in the dashboard.
2. If the group has a team, add the account that runs the reminders to that team. Without it the card cannot reach the channel, and RenewLock sends the email and Teams messages instead.
3. For a SharePoint group, let everyone see its members: Group settings > Who can view the membership of the group: Everyone.

## 11. Verification checks

- Manage apps shows the row RenewLock | 1.0.0.24 | Enabled | Added to all sites: Yes (classic catalog: Deployed = Yes).
- The in-page setup ends with the green bar "Lists are ready on `<site>`. Nothing else was changed." and the log lines "Created list Milestones / Settings / Renewals / Checkpoints".
- All three flows show Status On.
- Run RL-Engine once (Run > Run flow). Its run history shows Succeeded in under 10 seconds.
- After a page refresh the dashboard header shows a green **Flows connected** badge. "Flows not connected" means RL-Engine has not run yet. "Flows stale" means it has not run for more than 30 hours; check its run history for a failure email.
- `Settings` holds `EngineHeartbeat`, `FlowsVersion` 2026.10.17 (written by RL-Engine on every run) and `SchemaVersion` 2026.10.17.
- On Renewals, List settings > Owner and Backup owner show "Allow selection of: People and Groups"; on Checkpoints, Assignee does too.
- The `Checkpoints` list gains a row for every prompt sent.
- The first Teams cards go out on the next 6:00 AM run. **Import CSV** on the dashboard loads an existing tracker, or add renewals in the `Renewals` list.

## 12. Upgrade

Re-run the same steps with the new files. Your data is never touched.

- **Lists.** Update lists on the dashboard, the browser installer and the script add what is missing and make the in-place column changes a release needs (below). They never remove anything or touch your records, and they keep the `Settings` values you already have (time zone, currency, opaque mode, lead time) unless you pass or pick a new one.
- **Package.** Upload the new `RenewLock.sppkg` in Manage apps and enable it, or let the script's `Add-PnPApp -Overwrite -Publish` do it.
- **Path A.** Import the new `JRMRenewalGuard_<version>.zip` over the old; the solution import upgrades in place and keeps the connections and the site URL. The script passes `--force-overwrite`, so re-running it is the same upgrade.
- **Path B.** Build a new package for the site (Download flows package on the install page again, or `gen_legacy_package.py`), import it from My flows > Import > Import Package (Legacy), and on Review Package Content choose **Update** for each of the three flows instead of "Create as new" so they are replaced rather than duplicated; the fixed flow IDs make that possible. Map the connections as before, plus the new Office 365 Groups one, import as the same user (the importing user owns the flows), and check each flow is still turned on afterwards.

### Upgrading to 2026.10.17

1. **Lists.** Click **Update lists** on the dashboard, or run the browser installer or the script again. Each adds `LapseFee`, `DeliveredTo` and `Unreachable`, seeds `Currency` and `GroupMessageLimit`, widens `Owner`, `Backup` and `Assignee` to people and groups in place (existing values are kept; a column is never narrowed), sets the column descriptions, and re-applies the Checkpoints views. `SchemaVersion` is recorded as 2026.10.17 only when nothing failed and the code rule was not held, so the dashboard keeps offering Update lists until then. If a people column cannot be widened, change it by hand: the list > List settings > the column > Allow selection of: People and Groups > OK.
2. **Reminders.** Path A: import `JRMRenewalGuard_1_0_0_10.zip` over 1.0.0.9; the wizard asks for the new **Office 365 Groups** connection reference; create it like the other four. Path B: build a new package and import it with **Update** for each flow; there are now five Related resources.
3. **Until the reminders are updated,** a checkpoint owned by a group skips to the backup owner and then the supervisor; nothing is lost. The dashboard shows a warning when a group owns a live renewal and `Settings.FlowsVersion` (written by RL-Engine) is older than 2026.10.17.

## 13. Uninstall

1. **Flows.** Turn off and delete the three flows. Path A: delete the solution RenewLock reminders, or the flows inside it. Path B: in Power Automate > My flows delete RL-Engine, RL-Prompt and RL-Rollover, signed in as the user who imported them (that user owns them).
2. **App.** Remove RenewLock from the site and from Manage apps in the app catalog.
3. **Lists.** Keep or delete the four lists.
4. **Connections.** The five connections stay under Connections on either path; delete them there if nothing else uses them.
5. **Tenant features that stay.** If step 2 created the app catalog site, or step 4 created the Dataverse database (Path A only), those remain. Neither holds anything of RenewLock's once the package and flows are gone.

Nothing else was installed.

## 14. Troubleshooting for IT

- **Setup says the user must be a site owner, or list creation returns 403.** Only Manage Lists rights can create lists. A site owner opens the page and clicks Set up, or adds the user to the site's Owners group.
- **Manage apps says there is no app catalog.** In the modern SharePoint admin center the catalog is created for you: More features > Apps > Open. The first time, the page says "Creating the site for storing apps. This might take a few minutes, but only needs to be done once." Wait, reload, retry. Older admin centers: More features > Apps > App Catalog > Create a new app catalog site. The script does not create the catalog; it stops and asks for this.
- **Manage apps shows "Something went wrong" or "Try refreshing the page".** The `#/manageApps` shortcut failed. Use More features > Apps > Open, or go to `https://<tenant>.sharepoint.com/sites/appcatalog/_layouts/15/tenantAppCatalog.aspx/manageApps` directly. Ignore the yellow banner about SharePoint add-ins being retired; RenewLock is an SPFx package, not an add-in.
- **Edit says "Can't edit this page. Please try again later."** Close, reload the page, click Edit again. A brand-new site usually needs one retry.
- **The dashboard ended up on the wrong page.** The home page is whichever page opens at the site address (TopicHome.aspx on the Standard communication template). Site contents > Site Pages > select the page > Make homepage.
- **The RenewLock dashboard web part is not in the Toolbox.** Wait a minute and reload the editor; an app enabled moments ago can take a few minutes to reach the site.
- **No Republish or Publish button.** The current editor shows only Save as draft. Click it, reload the page, then click the Publish changes button that appears in view mode; a toast says "Page published."
- **Power Automate opens in the wrong organisation.** make.powerautomate.com keeps the last-used tenant and has no account switcher. Open it from the target tenant's Microsoft 365 app launcher, use `https://make.powerautomate.com/environments/Default-<tenant id>/solutions`, or sign out of Power Automate first. Check the account menu and the `<Org> (default)` environment before importing.
- **Solutions says "No database found".** Section 8.
- **Path B wizard shows "No items" under a Related resource.** That connector has no connection in this environment yet. Create it under Connections > New connection, sign in as the flow-running account, then click the wrench and Refresh list again.
- **Path B flows are Off after import.** Normal. Open each of RL-Engine, RL-Prompt and RL-Rollover and click Turn on.
- **The flows will not turn on.** Either a connection reference is not bound (Path A: open the solution > Connection references and pick a connection on each), or a data loss prevention policy blocks Teams or Outlook alongside SharePoint in this environment. A Power Platform admin adds an exception for those five connectors.
- **The dashboard says Flows not connected or Flows stale.** Not connected: RL-Engine has not run yet; open it and click Run. Stale: it has not run for more than 30 hours; check its run history.
- **A people column still accepts people only.** Update lists, the browser installer and the script each print which one. Open the list > List settings > the column > Allow selection of: People and Groups > OK, then run Update lists again so `SchemaVersion` is recorded.
- **A group owner's checkpoint went straight to the backup owner.** Either the reminders are older than 2026.10.17 (check `Settings.FlowsVersion`; import the new reminders file), or nobody in the group could be reached: the checkpoint shows `Nobody reachable` = Yes and `Delivered to` says why. Check the setup checklist in section 10.
- **The script stops at the start.** Missing `-ClientId` (section 5), a missing template, package or solution zip next to the script, no tenant app catalog, or no .NET SDK when flows are not skipped. Each message says what to do.

## 15. Where the customer-facing documentation lives

- https://www.renewlock.com/install is the install page for office managers and IT generalists: one plain path with every click folded under expanders, the Path B package builder (the site address box and the **Download flows package** button, built in the browser by `/install/flows.js`), the downloads with versions and checksums, and the pointers to the script and the skill.
- https://www.renewlock.com/help is the Help page that carries the vocabulary, the pop-ups, and the troubleshooting detail that left the install page.
- https://www.renewlock.com/install/skill/SKILL.md is the published copy of `skill/SKILL.md` for the AI-assisted path.
- The script prints https://www.renewlock.com/install as the guide with screenshots of every pop-up, and the web part's Setup card (1.0.0.20) carries the step 2 and step 3 instructions inside the dashboard, with a link to the full install guide.
- This README and `RUNBOOK.md` ship in the installer kit and are not customer-facing pages.
