Govern stale Entra ID guest accounts with SharePoint and Microsoft Teams
Ready for 3.0What 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).
- Config (Edit Fields (Set)): sets 8 fields: sharepointSiteId, pendingDeletionsListId, teamsTeamId…
- Config (Executioner) (Edit Fields (Set)): sets 7 fields: sharepointSiteId, pendingDeletionsListId, auditLogListId…
- Set Configuration Parameters (Edit Fields (Set)): sets 8 fields: sharepointSiteId, pendingDeletionsListId, teamsTeamId…
- Set Execution Parameters (Edit Fields (Set)): sets 7 fields: sharepointSiteId, pendingDeletionsListId, auditLogListId…
- Get Guest Users (HTTP Request): calls graph.microsoft.com
- Get Overdue Pending Deletions (Microsoft SharePoint): work with item
- Fetch Guest Users from Graph (HTTP Request): calls graph.microsoft.com
- Fetch Overdue Pending Deletions (Microsoft SharePoint): work with item
- Filter Stale Per Page (Code): runs custom JavaScript code
- 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
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)
- Code
n8n-nodes-base.code - Microsoft SharePoint
n8n-nodes-base.microsoftSharePoint - Microsoft Teams
n8n-nodes-base.microsoftTeams - If
n8n-nodes-base.if - Microsoft Entra ID
n8n-nodes-base.microsoftEntra - No Operation, do nothing
n8n-nodes-base.noOp - Edit Fields (Set)
n8n-nodes-base.set - Schedule Trigger
n8n-nodes-base.scheduleTrigger - HTTP Request
n8n-nodes-base.httpRequest
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…