---
name: renewlock-install
description: Install or upgrade RenewLock (SharePoint lists + SPFx dashboard + Power Automate flows) in the user's own Microsoft 365 tenant, step by step, stopping for the human at Microsoft sign-ins, consent prompts, the app-catalog upload, a Solutions page that says "No database found" (then offering Path B, a legacy flow package that needs no database), the Path B zip file picker, connections and any purchase.
---

# RenewLock install skill

You are helping a tenant administrator install RenewLock. Work from the files next to this skill: `../RUNBOOK.md`, `../Install-RenewLock.ps1`, `../RenewLock.template.xml`, `../RenewLock.sppkg` (1.0.0.24), `../JRMRenewalGuard_1_0_0_10.zip` (the same file is published on the install page as `RenewLock-reminders.zip`; this is Path A, the solution import, which needs a Dataverse database) and, for Path B (a legacy flow package that needs no Dataverse database), `../../solution/tools/gen_legacy_package.py` or the "Download flows package" button at https://www.renewlock.com/install#path-b. The whole install takes about 25 minutes the first time.

## Rules
- Never ask for, store, or type a password, code, or token. Microsoft's own sign-in window handles authentication; tell the user when a window will open and wait.
- Run one step at a time. Before each step say what it does and what it changes. After each step show the result.
- Stop and hand to the human at: every Microsoft sign-in window, the PnP "Permissions requested" page and any other consent prompt, the tenant app catalog upload and its "Confirm data access" panel, a Power Automate Solutions page that says "No database found" (a Global Administrator or Power Platform Administrator must click "Create a database" once, or the human chooses Path B), the Connections step of the solution import, the "Upload" file picker and every connection sign-in of the Path B legacy package import, turning flows on, adding the flow-running account to a team (a team owner or Teams admin does it), and anything that would buy a licence or add-on. Resume when they say so.
- Use only the site URL and environment the user gives you. Do not create sites or environments without asking.
- Open Power Automate from the target tenant's Microsoft 365 app launcher (waffle, More apps, Power Automate) or the direct link https://make.powerautomate.com/environments/Default-<tenant id>/solutions. Bare make.powerautomate.com opens in whichever organisation the browser last used and has no account switcher. Before importing, confirm the account menu top right shows the customer's organisation and the environment picker shows "<Org> (default)".
- RenewLock stores nothing in Dataverse. The environment needs a Dataverse database only for Path A, to hold the flows solution (most have one; see step 4 of the install page). If Solutions says "No database found" with only a "Create a database" button and no Import solution command, stop and hand to the human: a Global Administrator or Power Platform Administrator clicks "Create a database" once (it takes a few minutes), then reload the Solutions page. If no such admin is available (or the customer does not want a database), offer Path B: a legacy flow package imported from My flows > Import > Import Package (Legacy), which needs no Dataverse database (Procedure step 4). The script path stops at `pac solution import` on the same tenant for the same reason, so check this before running it.
- In the "Confirm data access" panel keep "Enable this app and add it to all sites" selected and untick "Add to Teams" unless the customer has asked for a Teams app.
- Every step is idempotent; if one fails, fix the cause and re-run that step only.

## What the user will see (tell them before each one)
- Microsoft sign-in windows when the script connects to the admin center, the site and the app catalog; on the first PnP sign-in a "Permissions requested" page an admin must accept once.
- The script's own plan and "Type yes to continue" prompt; pass -Force only if the user has already approved the plan in chat.
- Creating the site (only if the user asked for a new one): the SharePoint start page has no "Create site" button. Dismiss any "Explore SharePoint" dialog, then Build → "Site" card → Select a site template → Communication site tab → Standard communication → Preview site template → Use template → Set up your site (name RenewLock; wait for "The site address is available") → Create site → "Your site is ready!" → Go to site.
- In the SharePoint admin center: More features → Apps → Open (the #/manageApps shortcut can error with "Something went wrong"). On a tenant with no app catalog yet the first Open silently creates one at /sites/appcatalog and shows "Creating the site for storing apps. This might take a few minutes"; wait, then reload. Upload opens only the browser's file picker. After the upload: select the RenewLock row → Enable → panel titled "Confirm data access" (keep "Enable this app and add it to all sites" selected, untick "Add to Teams" unless the customer wants a Teams app) → Confirm → panel "This app has been enabled" → Close. The row then reads Enabled, Added to all sites: Yes. No API-access approval appears.
- The site home page is the page that opens at the site address (TopicHome.aspx on the Standard communication template, not Home.aspx); never navigate to Home.aspx by name. If the dashboard was put on another page: Site contents → Site Pages → select it → Make homepage. On the home page: Edit may first fail with "Can't edit this page. Please try again later."; reload and click Edit again. Web parts are picked from the right-hand Toolbox pane (search "RenewLock", click "RenewLock dashboard"). There is no Republish button: click Save as draft, reload the page, then click Publish changes (toast "Page published.").
- On the published page: on first load only the "Set up RenewLock on this site" card shows (stepper, "Set up this site", "Install guide"); the dashboard chrome is hidden until setup is done. "Set up this site" asks "Create the four RenewLock lists on <site>?"; "Yes, create the lists" runs a progress bar for one to two minutes with the log lines "Created list Milestones / Settings / Renewals / Checkpoints", then the green bar "Lists are ready on <site>. Nothing else was changed." followed by the Step 2 and Step 3 instructions in the card. If the user is not a site owner the button is greyed out and a warning names who to ask. In 1.0.0.20 the card's "No database found" step points to Path B.
- In Power Automate (opened from the target tenant's app launcher): the account menu top right showing the customer's organisation and the environment picker showing "<Org> (default)". If Solutions says "No database found" with only a "Create a database" button, stop (see Rules). Otherwise the Connections step (five rows: SharePoint, Microsoft Teams, Office 365 Outlook, Office 365 Users, Office 365 Groups; New connection opens a sign-in, click Accept) and the Environment variables step (paste the site URL), then a one-to-three-minute import bar.
- Path B (legacy package): on https://www.renewlock.com/install#path-b a box "Your RenewLock site URL" and a button "Download flows package"; the browser builds RenewLock-flows-<site>.zip with the site URL baked into the three flows (nothing is sent anywhere). In Power Automate, My flows > Import > Import Package (Legacy) > Upload opens only the browser's file picker. The wizard page "Review Package Content" 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 the wrench under Action opens a panel; "Refresh list" fills it; clicking the connection row (the user's account) and Save makes the row show that account. If the panel says "No items" the connection does not exist yet: Connections > New connection > pick the connector > Create > sign in as the account that should run the flows (the first one asks for sign-in, the rest usually connect silently). With all five mapped, Import shows a bar "Importing your package ... Don't navigate away" for one to two minutes, then "All package resources were successfully imported." The flows arrive turned OFF (My flows shows a small no-entry badge on each flow icon).

## Procedure
1. Ask for: the site URL (create or use), the Power Platform environment name, the currency for costs and fees (a three-letter ISO 4217 code; default USD), and whether to use the script path or the in-page setup. Tell the user the whole install takes about 25 minutes the first time. Confirm PowerShell 7 is available (`pwsh -v`) for the script path. Before either path, open the target environment's Solutions page in Power Automate (from the target tenant's app launcher): if it says "No database found", stop (see Rules): an admin clicks "Create a database" once, or, if none is available, offer Path B (step 4).
2. Script path: run `Install-RenewLock.ps1 -SiteUrl <url> -Environment "<env>"` (add `-Currency <code>` when it is not USD; on a site that already has RenewLock, leave it out to keep the site's own value) from the installer folder, or run its sections separately in this order: site + template, app catalog, home page, solution import. Explain each section as it runs. The solution import section (`pac solution import`) stops on a tenant whose environment lacks a Dataverse database; that is the same "No database found" precondition as Path A on the in-page path, and Path B (step 4) is the fallback here too.
3. In-page path: do step 2 (app catalog) only, then tell the user to open the site home page, click **Edit** (reload and click Edit again if "Can't edit this page. Please try again later." appears), add the **RenewLock dashboard** web part from the Toolbox pane, click **Save as draft**, reload the page, click **Publish changes**, then click **Set up this site** and **Yes, create the lists**; wait for "Lists are ready on <site>. Nothing else was changed."; then guide the solution import from the runbook (Path A), opening Power Automate from the target tenant's app launcher, or Path B (step 4) when Solutions says "No database found".
4. Path B (only when Solutions says "No database found" and no Global Administrator or Power Platform Administrator is available to click "Create a database"): the legacy flow package. State the trade-offs plainly first: the site URL is baked in, so one package per site; the importing user owns the flows; upgrades mean importing the new package again and choosing "Update" for each flow; Microsoft labels the import "Legacy"; there is no environment variable and no connection references. Both paths need the same five connections (SharePoint, Microsoft Teams, Office 365 Outlook, Office 365 Users, Office 365 Groups), and the import takes about the same time as Path A (5 to 10 minutes including connections). Then:
   - Build the package: open https://www.renewlock.com/install#path-b, type the site URL in "Your RenewLock site URL" and click "Download flows package"; the browser builds RenewLock-flows-<site>.zip with the site URL baked into the three flows (nothing is sent anywhere). From the command line the same file comes from `python ../../solution/tools/gen_legacy_package.py <site url> <out.zip>`. Tell the user where the zip landed.
   - Open Power Automate from the target tenant's app launcher and do the same tenant check as Path A (account menu shows the customer's organisation, environment picker shows "<Org> (default)"). Go to My flows > Import > Import Package (Legacy) > Upload. Stop: Upload opens only the browser's file picker, which you cannot drive, so the human picks the zip. Resume when the page shows "Review Package Content".
   - On "Review Package Content" confirm 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 you can click the wrench under Action, click "Refresh list", click the connection row (the user's account) and click Save; the row then shows that account. If the list says "No items", stop: you cannot complete a connection sign-in, so the human creates the connection first (Connections > New connection > pick the connector > Create > sign in as the account that should run the flows; the first one asks for sign-in, the rest usually connect silently). Then return to the wizard, click the wrench and "Refresh list" again and pick the row.
   - When all five rows show an account, click Import. A bar says "Importing your package ... Don't navigate away" for one to two minutes; wait for "All package resources were successfully imported."
   - The flows arrive turned OFF: My flows shows a small no-entry badge on each flow icon. Turning flows on is a stop point: say so and ask; once the user says go, open each flow (RL-Engine, RL-Prompt, RL-Rollover) and click "Turn on".
   - Open RL-Engine > Run > Run flow. The run history shows Succeeded in under 10 seconds; the dashboard header shows "Flows connected" after a refresh.
5. After the flows are on, run RL-Engine once (Path A: ask the user; Path B: RL-Engine > Run > Run flow yourself) and confirm the run shows Succeeded and the dashboard header shows **Flows connected** after a refresh.
6. Offer **Import CSV** for an existing tracker.
7. Group owners: Owner and Backup owner can be a group (a Microsoft 365 group with or without a team, a security group, or a SharePoint group of the site); the supervisor is always one person. If the user will use groups, give them this checklist and stop for them on each item: (1) give the group edit access to the RenewLock site (Settings > Site permissions > Share site, add the group as a member); (2) for a group with a team, add the flow-running account to that team, or the card cannot reach the team's General channel and RenewLock sends the group email and Teams messages instead; (3) for a SharePoint group, Group settings > Who can view the membership of the group: Everyone. A group without a team gets one email plus a short Teams message to each member, up to `GroupMessageLimit` in the Settings list (default 10; bigger groups get the email only). Money shows in the `Currency` set in the Settings list (default USD).
8. Summarise what was installed: site, lists, package version, path taken (A: solution version; B: package file name RenewLock-flows-<site>.zip), flow owner account, the five connections, and any teams the flow-running account was added to.

## Upgrade (an existing site, to 2026.10.17)
Do these in this order; each is safe to repeat. Say what each changes before it runs.
1. Package: upload the new `../RenewLock.sppkg` (1.0.0.24) in Manage apps and enable it (stop: app catalog upload), or let the script do it. The dashboard's **Update lists** button comes with it.
2. Lists first: the user (a site owner) clicks **Update lists** on the dashboard, or re-run the browser installer or `Install-RenewLock.ps1` (without `-Currency` or `-TimeZone`, so the site keeps its own values). This adds `LapseFee` (Fee if it lapses), `DeliveredTo` and `Unreachable`, seeds `Currency` and `GroupMessageLimit`, and lets Owner, Backup owner and Assignee accept groups; existing values are kept. Confirm `Settings.SchemaVersion` reads 2026.10.17. If it does not, the log names a column that could not be changed: the user opens that list > List settings > the column > Allow selection of: People and Groups > OK, then clicks Update lists again.
3. Then the reminders. Path A: import `../JRMRenewalGuard_1_0_0_10.zip` over the old solution; the Connections step now has a fifth row, **Office 365 Groups**; stop for the human to create it with the flow-running account. Path B: build a new package, import it and choose "Update" (not "Create as new") for each flow; map the five Related resources, the new one being Office 365 Groups (stop for the human if it says "No items"). Check all three flows are On afterwards.
4. Run RL-Engine once and confirm `Settings.FlowsVersion` reads 2026.10.17. Until the reminders are updated, a checkpoint owned by a group skips to the backup owner and then the supervisor, and the dashboard shows a warning.
5. If groups with a team own renewals, stop for the human to add the flow-running account to each of those teams.

## Troubleshooting
- 403 creating lists: user lacks Manage Lists on the site; ask a site owner.
- "No app catalog": a SharePoint Administrator opens SharePoint admin center → More features → Apps → Open; the first Open creates the catalog at /sites/appcatalog and shows "Creating the site for storing apps. This might take a few minutes". Wait a few minutes, reload, then upload. (Older admin centers: More features → Apps → App Catalog → Create a new app catalog site.)
- 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.
- Edit says "Can't edit this page. Please try again later.": close the dialog, reload the page and click Edit again; a brand-new site usually needs one retry.
- 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 button: the newer editor shows only Save as draft. Click it, reload the page, then click Publish changes (toast "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 or use https://make.powerautomate.com/environments/Default-<tenant id>/solutions, then check the account menu and the "<Org> (default)" environment.
- Solutions says "No database found": the environment lacks a Dataverse database, so there is no Import solution command. Stop and hand to the human: a Global Administrator or Power Platform Administrator clicks "Create a database" once (it takes a few minutes), then reload. RenewLock stores nothing in Dataverse; the database only holds the solution. The script path stops at `pac solution import` on the same tenant. If no such admin is available, use Path B (Procedure step 4): a legacy flow package imported from My flows > Import > Import Package (Legacy), which needs no database.
- Path B wizard shows "No items" under a Related resource: that connector has no connection in this environment yet. The human creates it (Connections > New connection > pick the connector > Create > sign in as the account that should run the flows), then click the wrench and "Refresh list" again and pick the row.
- Path B flows are Off after import: that is normal; My flows shows a small no-entry badge on each flow icon. Open each flow (RL-Engine, RL-Prompt, RL-Rollover) and click "Turn on".
- Path B upgrade: import the new RenewLock-flows-<site>.zip again from My flows > Import > Import Package (Legacy) and choose "Update" for each flow instead of "Create as new" so the flows are replaced rather than duplicated; map the same connections plus the new Office 365 Groups one (five in all). Update the lists first (see Upgrade).
- Flows will not turn on: connections not bound, or a DLP policy puts Teams, Outlook, Office 365 Users or Office 365 Groups in a different group from SharePoint in this environment; an admin must add an exception.
- A group with a team got emails and Teams messages instead of the channel card (the checkpoint's Delivered to ends with "Teams channel post failed", or names no channel): the flow-running account is not a member of that team, or the team is archived. Add the account to the team; the next checkpoint goes to the channel.
- A checkpoint's Delivered to says "Nobody reachable": the group was deleted; or it has no team, no email address and no member with a mailbox; or RenewLock could not list its members (for example a SharePoint group whose membership only its members can see); or the owner is something RenewLock cannot message, such as Everyone. It escalates to the backup owner and then the supervisor on the next RL-Engine run. Fix the group or pick another owner.
- The dashboard warns that the reminders are older than 17 October 2026: import the new reminders (Upgrade step 3), then run RL-Engine once.
- Update lists stays offered after it ran: a column could not be changed to accept groups. Open the list > List settings > the column (Owner, Backup owner or Assignee) > Allow selection of: People and Groups > OK, then click Update lists again.
- Dashboard says "Flows stale": RL-Engine has not run in 30 hours; open its run history.
