Skip to product information

Automate Entra B2B Guest Cleanup with n8n & MS Graph

Automate Entra B2B Guest Cleanup with n8n & MS Graph

 (200+Reviews)
Regular price £30.99
Regular price £30.99 Sale price
SAVE Sold out
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
âš¡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Automate Entra B2B Guest Cleanup with n8n & MS Graph

Automate Entra B2B Guest Cleanup with n8n & MS Graph

Regular price £30.99
Regular price £30.99 Sale price
SAVE Sold out

Streamline B2B Guest Account Management with n8n & Microsoft Graph

Effortlessly keep your Entra ID (Azure AD) clean by automating the inactivity cleanup of B2B guest accounts using the robust capabilities of n8n and Microsoft Graph. This meticulously designed workflow operates weekly to identify and manage dormant accounts, ensuring your directory remains secure and clutter-free.

What this workflow does

  • Triggers every Monday at 08:00 (server time) to scan Entra ID for B2B guest accounts using Microsoft Graph.
  • Retrieves all guest user accounts, complete with sign-in activity metadata through pagination.
  • Filters for guest accounts whose last sign-in or creation date surpasses a predefined inactivity threshold.
  • If no inactive accounts are detected, it sends a completion update to a Microsoft Teams channel and halts further actions.
  • Upon identifying inactive accounts, the workflow notifies each account's sponsor in Microsoft Teams, tagging their information for transparency.
  • After a 72-hour grace period, it diligently deletes the inactive accounts via Microsoft Graph.
  • Logs each successful deletion to a SharePoint list and alerts Microsoft Teams if any deletions fail, ensuring continuous processing of other accounts.
  • Concludes with a comprehensive run summary posted to Microsoft Teams, enhancing oversight and control.

Use cases

  • Optimize security by automatically purging inactive guest accounts, reducing risks associated with unused access permissions.
  • Facilitate seamless guest account management for organizations frequently collaborating with external partners and clients.
  • Enhance operational efficiency by automating routine directory maintenance tasks, freeing up time for more strategic IT initiatives.

Technical details

  • Integrations/Nodex used: Microsoft Graph (OAuth2 credentials), Microsoft Teams, SharePoint
  • n8n nodes implemented: If, Set, Code, No Op, Wait, Merge
  • Ensure comprehensive permissions are established for reading user data, sign-in activity, user management, user deletion, and audit logging to SharePoint.
View full details