Templates / Govern stale Entra ID guest accounts with SharePoint and Microsoft Teams

Govern stale Entra ID guest accounts with SharePoint and Microsoft Teams

Ready for 3.0

by Mychel Garzon ✓ · 893 views · created 2026-05-31 · SecOps

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 54 nodes and runs on a schedule (cron 0 8 * * 1) (plus 3 other triggers). Along the way it connects Microsoft SharePoint, Microsoft Teams and Microsoft Entra ID. It also calls graph.microsoft.com over HTTP.

How it runs

Trigger: On a schedule (cron 0 8 * * 1) (plus 3 other triggers).

  1. Config (Edit Fields (Set)): sets 8 fields: sharepointSiteId, pendingDeletionsListId, teamsTeamId…
  2. Config (Executioner) (Edit Fields (Set)): sets 7 fields: sharepointSiteId, pendingDeletionsListId, auditLogListId…
  3. Set Configuration Parameters (Edit Fields (Set)): sets 8 fields: sharepointSiteId, pendingDeletionsListId, teamsTeamId…
  4. Set Execution Parameters (Edit Fields (Set)): sets 7 fields: sharepointSiteId, pendingDeletionsListId, auditLogListId…
  5. Get Guest Users (HTTP Request): calls graph.microsoft.com
  6. Get Overdue Pending Deletions (Microsoft SharePoint): work with item
  7. Fetch Guest Users from Graph (HTTP Request): calls graph.microsoft.com
  8. Fetch Overdue Pending Deletions (Microsoft SharePoint): work with item
  9. Filter Stale Per Page (Code): runs custom JavaScript code
  10. Any Due For Deletion? (If): checks a condition and branches into true / false

…plus 36 more steps. See the full node list below.

Services it uses

Microsoft SharePointMicrosoft TeamsMicrosoft Entra ID

HTTP calls to: graph.microsoft.com

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Rarely used nodes in this template: n8n-nodes-base.microsoftEntra

Nodes used (9)

From the author

Quick overview This template runs two scheduled workflows to govern Microsoft Entra ID (Azure AD) guest accounts by detecting stale users via Microsoft Graph, staging deletions in SharePoint with a 72-hour window, notifying sponsors in Microsoft Teams, and…

Excerpt from Mychel Garzon's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.