Tools & Implementation • Automation • Patch Governance • Microsoft 365 • RACF-CC Domain 3

Never Miss a Patch Window: Automating Server and Firewall Updates with Power Automate, Planner and Teams

When vulnerability scans reveal unpatched servers and overdue firewalls, the problem in small charity IT teams is rarely a lack of skill or care - it is the cognitive overload of juggling user support, safeguarding tickets, and manual spreadsheets. Here is the complete blueprint of a closed-loop patch operations system built using standard Microsoft 365 tools, developed and proven in a live care charity environment.

Trends4You Technical GuidePublished

The operational dilemma

The vulnerability scan finding that everyone recognises

During routine cybersecurity vulnerability assessments (whether using Tenable Nessus, Microsoft Defender for Endpoint, or external Cyber Essentials Plus audits), a recurring pattern emerges across charities, non-profits, and educational trusts: critical infrastructure servers and edge firewalls that have fallen weeks or months behind on security updates.

When external auditors or consultants observe this, their standard response is often unhelpful: "Just buy an enterprise vulnerability management platform" or "Implement an automated patch orchestration suite." For small IT teams operating on non-profit budgets, those solutions cost tens of thousands of pounds that simply do not exist.

The root cause is almost never technical ignorance. In small and medium-sized charities, systems administrators wear half a dozen hats every day. They handle urgent user account lockouts, troubleshoot care management software, configure frontline laptops, and manage telephony alongside infrastructure security. When patch tracking relies on personal memory, calendar invites, or static Excel spreadsheets, a sudden operational crisis causes maintenance schedules to slip silently.

Patch Tuesday arrives, two primary domain controllers get updated, but a secondary application server or branch office firewall is deferred until "tomorrow" - and tomorrow gets overtaken by a new operational emergency. Before long, 60 or 90 days have elapsed, leaving unpatched CVEs waiting for an attacker.

The Research Objective

Developed as part of applied postgraduate cybersecurity research into resource-aware defences, this project set out to answer a practical question: Can we build a self-maintaining, closed-loop update governance system that guarantees accountability, prevents forgotten patches, and escalates overdue risks - using only the Microsoft 365 tools the charity already pays for?

System architecture

The closed-loop lifecycle: How four tools work as one

Rather than introducing proprietary third-party software, this solution leverages four native components already present in Microsoft 365 Business Premium and Enterprise licences:

1. SharePoint Online List

System of Record: Stores the master asset inventory, responsible owners, next due dates, and state flags. It acts as the single source of truth for both servers and firewalls.

2. Microsoft Planner & To Do

Work Execution Layer: Translates abstract schedules into tangible, actionable tasks. When assigned in Planner, tasks automatically sync to the engineer's personal Microsoft To Do app.

3. Microsoft Teams

Operational Visibility: Surfaces overdue items into an engineering and management channel, fostering collaborative accountability without overwhelming inboxes with email spam.

4. Power Automate

Orchestration Engine: Executes the business logic across four distinct flows: scheduled task creation, schedule roll-forward on completion, overdue escalation, and task cleanup.

The State Machine Lifecycle

The entire system functions as a deterministic state machine, ensuring that an asset cannot get stuck or produce duplicate tasks:

Current State Trigger Event Next State Operational Action
Active Next due date reached (Daily schedule) Task Created Creates Planner task assigned to owner; writes PlannerTaskID back to SharePoint as an idempotency lock.
Task Created Engineer marks Planner task complete Completed Records completion timestamp; calculates new due date (+7 days for firewalls, +14 days for servers).
Completed Automatic roll-forward in Power Automate Active Clears PlannerTaskID to null; updates due date; resets the trigger latch for the next cycle.
Task Created Task remains incomplete after 7 days overdue Escalated Posts an escalation alert to the Teams channel; sets timestamp to prevent repeated daily spam.

Step 1: Data model

Setting up the SharePoint asset register

The foundation of the system is a single SharePoint Online list (e.g. Infrastructure Update Calendar). It contains two categories of columns: administrative fields populated by IT staff, and system fields managed strictly by Power Automate.

Column Display Name Field Type Role & Configuration Managed By
Title Single line of text Asset identifier (e.g. DC01, APP01, HQ-FW01, CARE-EXCH01). IT Administrator
AssetType Choice Options: Server, Firewall. Controls task bucket and recurrence rhythm. IT Administrator
NextDueDate Date only The target date by which updates must be installed and verified. Automated (Flow 2)
UpdateInterval Choice Options: Weekly, Fortnightly, Monthly (used for audit reporting). IT Administrator
Owner Person or Group The primary engineer responsible for maintaining this asset. IT Administrator
Status Choice Options: Active, Task Created, Completed, Decommissioned. Automated / IT Admin
PlannerTaskID Single line of text Critical: Holds the Planner task ID. Acts as an idempotency lock to prevent duplicate tasks. Automated (Flow 1 / 2)
LastCompleted Date and Time Audit timestamp recorded when the engineer checks off the update in Planner. Automated (Flow 2)
LastEscalationSent Date and Time Timestamp when an overdue warning was posted to Teams. Prevents repeated alerting. Automated (Flow 3)
LastAlertSent Date and Time Timestamp when the initial task creation alert was dispatched. Automated (Flow 1)

Why the PlannerTaskID Field is Essential

In automated scheduling, the biggest failure point is duplicate task generation. If an engineer is on leave and a server update is not completed on Monday morning, a naive daily flow would create a second task on Tuesday, a third on Wednesday, and so on. By storing the active PlannerTaskID directly on the SharePoint record, the creation flow checks whether an open task already exists before generating anything new.

Step 2: Automation engine

The four Power Automate flows explained

The system is driven by four lightweight cloud flows. Below are the exact triggers, filter queries, and expressions needed to build them in your tenant.

Flow 1: Scheduled Task Creation (SharePoint → Planner & To Do)

Trigger: Recurrence (runs every Monday morning, or daily at 08:00).

Purpose: Identifies any asset that is due or overdue and creates a Planner task, but only if no open task exists.

1. SharePoint "Get items" Action

Use an OData filter query to ensure only relevant assets are retrieved from SharePoint, keeping execution fast and light:

PlannerTaskID eq null and Status eq 'Active' and NextDueDate le '@{formatDateTime(utcNow(), 'yyyy-MM-dd')}'

This retrieves only active assets whose due date is today or earlier, where no active Planner task is currently recorded.

2. Asset Type Switch & Task Assignment

For each returned item, branch using a Switch action on AssetType/Value:

  • Server Branch: Targets the Servers bucket in your Planner plan with title Server Updates - @{items('For_each')?['Title']}.
  • Firewall Branch: Targets the Firewalls bucket in your Planner plan with title Firewall Updates - @{items('For_each')?['Title']}.

Assignment Logic: Check if the asset has a designated Owner:

empty(items('For_each')?['Owner']?['Claims'])

If true, assign to a fallback account (e.g. the Infrastructure Lead) so no task is ever orphaned. If false, assign directly to the named engineer. Because Planner tasks sync natively with Microsoft 365, the task instantly appears on the engineer's personal Microsoft To Do app across desktop and mobile.

3. Update SharePoint Record

Immediately after creating the task, update the SharePoint list row:

  • PlannerTaskID = @outputs('Create_a_task')?['body/id']
  • Status = Task Created
  • LastAlertSent = @utcNow()

Flow 2: Completion Roll-Forward (Planner → SharePoint)

Trigger: Planner When a task is completed.

Purpose: When an engineer completes their patching and checks off the task in Planner, this flow automatically rolls the schedule forward to the next interval.

1. Locate SharePoint Record by Task ID

Query the SharePoint list using the completed task ID as the lookup filter:

PlannerTaskID eq '@{triggerOutputs()?['body/id']}'

2. Compute Next Due Date Dynamically

In a Compose action, evaluate the asset type to assign a realistic maintenance window:

@if(
  equals(item()?['AssetType']?['Value'], 'Firewall'),
  formatDateTime(addDays(utcNow(), 7), 'yyyy-MM-dd'),
  formatDateTime(addDays(utcNow(), 14), 'yyyy-MM-dd')
)

Why 14 days for servers? Aligning server roll-forward to 14 days matches Microsoft's standard Patch Tuesday release schedule plus a built-in one-to-two-week staging and verification window. Firewalls roll forward by 7 days for weekly status and signature verification.

3. Reset the SharePoint Record

Update the item in SharePoint with the new schedule state:

  • NextDueDate = @outputs('Compose_Next_Due_Date')
  • Status = Active
  • LastCompleted = @utcNow()
  • PlannerTaskID = @null (clears the idempotency lock so Flow 1 can trigger again when due)

Flow 3: Overdue Escalation (After 7 Days)

Trigger: Recurrence (runs weekdays at 09:00).

Purpose: Protects against ignored tasks. If an update is overdue by more than 7 days, it alerts the team in Microsoft Teams.

1. Query Overdue Items

Filter for items whose due date is more than 7 days in the past and still have an open task:

NextDueDate lt '@{formatDateTime(addDays(utcNow(), -7), 'yyyy-MM-dd')}'
and PlannerTaskID ne null
and Status ne 'Completed'
and Status ne 'Decommissioned'

2. Anti-Spam Condition & Teams Message

Check if an escalation has already been dispatched during this cycle:

empty(item()?['LastEscalationSent'])

If empty (or if the date is older than 7 days), post an actionable alert into the #Infrastructure-Updates Teams channel:

⚠️ Overdue Infrastructure Update

Asset: DC01
Type: Server
Target Due Date: 2026-11-12
A Planner task is active and now more than 7 days overdue. Please complete patching or defer with documented justification.

Immediately update SharePoint with LastEscalationSent = @utcNow() to ensure no further alerts fire for this cycle.


Flow 4: Completed Task Housekeeping

Trigger: Recurrence (runs monthly on the 1st).

Purpose: Over months of operation, completed Planner cards accumulate, slowing down UI rendering and cluttering the board. This flow purges completed tasks that are older than 30 days while leaving the permanent audit log intact in SharePoint.

Filter Expression

Evaluate tasks in Planner that are 100% complete and were marked completed over 30 days ago:

@and(
  equals(item()?['percentComplete'], 100),
  not(empty(item()?['completedDateTime'])),
  lessOrEquals(
    ticks(item()?['completedDateTime']),
    ticks(addDays(utcNow(), -30))
  )
)

If true, execute Delete a task. This keeps the active Planner board lightweight and snappy for day-to-day work.

Governance & security

Operational controls and access boundaries

A frequent concern with low-code automations is governance: how do we prevent well-meaning staff from breaking the workflow, and how do we handle equipment retirement?

Role-Based Access

Flows should be owned by a dedicated service account or the primary infrastructure lead. IT Managers receive view-only permissions to the SharePoint list and Planner board, giving full audit visibility without risk of workflow disruption.

Decommissioning Protocol

Deleting a row from SharePoint does not automatically delete active Planner tasks. When retiring a server or firewall, set Status = Decommissioned in SharePoint and close the open Planner task. This preserves the historical audit trail.

Zero-Trust Data Boundary

All data remains strictly within your organisation's existing Microsoft 365 tenant boundary. No third-party connectors, external databases, or sensitive host credentials are required or exposed.

Auditability for Inspections

Every update completion records a permanent UTC timestamp in SharePoint alongside the completing engineer's identity, providing instant proof of regular maintenance for auditors.

Real-world impact

Measurable benefits for care charities and non-profits

Implementing this closed-loop engine delivered immediate, quantifiable improvements in operational cybersecurity maturity:

  • Eliminated "Forgotten" Servers: In subsequent Nessus vulnerability scans, zero servers were flagged with overdue patches exceeding 30 days. The automated roll-forward ensured every secondary server received regular maintenance.
  • Full Alignment with Cyber Essentials Plus: Cyber Essentials requires that high-risk and critical vulnerabilities be remediated within 14 days. The 14-day server cycle and 7-day overdue escalation guarantee that vulnerabilities are caught and addressed within compliance thresholds.
  • Demonstrated Governance for Regulators: UK care organisations must provide evidence of well-led IT management under NHS DSPT (Data Security and Protection Toolkit) Category 3 and Care Quality Commission (CQC) Regulation 17. Exporting the SharePoint list provides an instant, timestamped register of patch governance.
  • Eliminated Management Chasing: IT managers no longer need to spend time in team meetings asking "Has anyone checked the firewalls this month?" Real-time status is visible on the Planner board, and Teams handles escalations automatically.

Framework governance

How this aligns with RACF-CC core principles

This automation project directly embodies the guiding principles of the Resource-Aware Cybersecurity Framework for Care Charities (RACF-CC):

RACF-CC Principle Traditional Enterprise Expectation Resource-Aware Operational Reality
Risk-led Purchasing expensive vulnerability management software suites with complex agent deployments. Prioritise the vulnerability window: Focuses directly on eliminating the human failure points that cause Nessus and Cyber Essentials scans to fail.
Resource-aware Allocating £10k+ in software licences and dedicated vulnerability analyst headcount. Leverage existing tooling: Built 100% within standard Microsoft 365 Business Premium / E3 licences that the charity already owns.
Care-conscious Enforcing aggressive, unannounced automated reboots that can disrupt frontline electronic medication (eMAR) logs and night shifts. Structured operational windows: Engineers execute patching during scheduled, low-impact maintenance periods while the automation ensures accountability.
Evidence-led Relying on staff assertions that "everything is up to date" during board reporting. Timestamped audit trails: SharePoint logs every completion and escalation, providing verified empirical evidence for DSPT and trustees.

Implementation references

Related guides and technical resources

Voluntary support

Found this useful? Support Trends4You

Trends4You's practical guides, RACF-CC resources and downloadable tools are provided free of charge. If they've helped you or your organisation, you can support the time and hosting that keeps them freely available.

Support is optional, handled securely by PayPal and does not provide additional access.