AutomationMart
Home/Browse/Govern stale Entra ID guest accounts with SharePoint and Microsoft Teams
n8n

Govern stale Entra ID guest accounts with SharePoint and Microsoft Teams

n8nn8n54 modulesv1.0
UNSUPPORTED_SLUG_FORMAT

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 deleting overdue guests while auditing outcomes. How it works 1. The Scanner (Runs Weekly): Fetches all guest users using native Microsoft Graph API pagination. 2. Filters Stale Accounts: Identifies guests with no sign-in activity for over 90

At a glance

Govern stale Entra ID guest accounts with SharePoint and Microsoft Teams is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects UNSUPPORTED_SLUG_FORMAT. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
UNSUPPORTED_SLUG_FORMAT
Modules
54
Price
Free
Version
v1.0
Govern stale Entra ID guest accounts with SharePoint and Microsoft Teams workflow diagram

About this workflow

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 deleting overdue guests while auditing outcomes. How it works 1. The Scanner (Runs Weekly): Fetches all guest users using native Microsoft Graph API pagination. 2. Filters Stale Accounts: Identifies guests with no sign-in activity for over 90 days. 3. Stages Deletions: Writes new stale accounts to a SharePoint PendingGuestDeletions list with a 72-hour countdown. 4. Alerts Sponsors: Mentions the assigned manager in a Microsoft Teams message, warning them of the impending deletion. 5. The Executioner (Runs Daily): Queries SharePoint for records where the 72-hour countdown has expired. 6. Checks Exceptions: Verifies if the sponsor added the guest to a SharePoint GuestRetentionExceptions list. 7. Deletes & Audits: Safely deletes the Entra ID account (if not retained), updates the staging list status, and logs the final outcome to an Audit SharePoint list. Setup 1. SharePoint: Create three lists: PendingGuestDeletions, GuestRetentionExceptions, and GuestAccountAuditLog (ensure columns match the workflow JSON). 2. Azure AD: Create an App Registration with User.ReadWrite.All, AuditLog.Read.All, Sites.ReadWrite.All, and ChannelMessage.Send (Application permissions). 3. n8n Credentials: Connect your OAuth2 (Client Credentials) setup to the "MS Graph - Guest Governance" credential. 4. Configuration: Open the two Config nodes (Scanner and Executioner) and paste your SharePoint Site ID, List IDs, and Teams Team/Channel IDs. 5. Error Handler: Go to Workflow Settings and bind your preferred Error Handler workflow to catch API routing failures. Requirements - Microsoft Entra ID (Azure AD) tenant - Microsoft SharePoint (for database state management) - Microsoft Teams (for sponsor alerts) - Azure App Registration with Application-level Graph API permissions Customization - Modify the inactivityThresholdDays (default 90) and responseWindowHours (default 72) in the Config nodes. - Adjust the Teams message HTML payload to match your internal IT branding. - Change the Cron triggers to match your specific IT operational cadence. Additional info This template completely avoids the severe limitations of long-running 72-hour Wait nodes by decoupling the discovery and deletion phases into two distinct workflows bridged by a SharePoint database. Combined with native node pagination and built-in rate-limit retries, this engine is highly resilient and safe to run in massive enterprise tenants with tens of thousands of guest users.

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Generate AI videos from text with HeyGen and voice cloning.

AI Video Generator with HeyGen 🚀 Create AI-Powered Videos in n8n with HeyGen This workflow enables you to generate realistic AI videos using HeyGen, an advanced AI platform for video automation. Simply input your text, choose an AI avatar and voice, and let HeyGen generate a high-quality video for you – all within n8n! ✅ Ideal for: - Content creators & marketers 🏆 - Automating personalized video messages 📩 - AI-powered video tutorials & training materials 🎓 --- 🔧 How It Works 1️⃣ Provide

Free

ADF: Call Synapse pipeline with a notebook activity

Azure Data Factory pipeline

Free

Evaluation metric example: categorization

AI evaluation in n8n This is a template for n8n's evaluation feature. Evaluation is a technique for getting confidence that your AI workflow performs reliably, by running a test dataset containing different inputs through the workflow. By calculating a metric (score) for each input, you can see where the workflow is performing well and where it isn't. How it works This template shows how to calculate a workflow evaluation metric: whether a category matches the expected one. The workflow takes s

Free

Diagnose n8n workflow errors with Claude AI, Supabase and Resend email alerts

Who's it for This workflow is for anyone who runs n8n workflows and wants to know immediately when something breaks, without digging through execution logs. Especially useful for non-technical users and freelancers or agencies managing workflows for clients. How it works When a workflow fails, this system activates automatically. Claude AI analyzes the error using the technical details and the business context you provide, then generates a diagnosis with the direct cause, a step-by-step f

Free

Create or update contacts in Apple iOS from new contacts in Teamleader

Every time a contact is created in Teamleader, a new contact will be instantly created in your Apple iOS device. In case the contact already exists in your iOS, it will only get updated.

Free

🎓 Learn Code Node (JavaScript) with an Interactive Hands-On Tutorial

How it works This workflow is a hands-on tutorial for the Code node in n8n, covering both basic and advanced concepts through a simple data processing task. 1. Provides Sample Data: The workflow begins with a sample list of users. 2. Processes Each Item (Run Once for Each Item): The first Code node iterates through each user to calculate their fullName and age. This demonstrates basic item-by-item data manipulation using $input.item.json. 3. Fetches External Data (A

Free

Audio-to-Trello task bot

Telegram Tasker Bot — это сценарий n8n, который принимает голосовые сообщения в Telegram, автоматически превращает их в текст, извлекает из него ключевые поля задачи и создаёт карточку в нужной доске Trello. Пользователь просто говорит задачу — бот сам оформляет её и присылает ссылку на готовую карточку. Для использования вам потребуется telegram bot. Его можно создать через бота BotFather Так же понадобится доступ к API chatgpt - он используется только для транскрибции аудио в речь. Вы можете

Free

Beginner Outlook calendar summary with OpenAI

A step-by-step demo that shows how to pull your Outlook calendar events for the week and ask GPT-4o to write a short summary. Along the way you’ll practice basic data-transform nodes (Code, Filter, Aggregate) and see where to attach the required API credentials. --- 1️⃣ Manual Trigger — Run Workflow | Why | Lets you click “Execute” in the n8n editor so you can test each change. | | --- | --- | --- 2️⃣ Get Outlook Events — Get many events 1. Node type: `Microsoft Outlook →

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free